etcdserver: minor cleanup
parent
813ff6ba48
commit
fb344bc33f
|
@ -447,18 +447,14 @@ func (s *EtcdServer) Do(ctx context.Context, r pb.Request) (Response, error) {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *EtcdServer) SelfStats() []byte {
|
||||
return s.stats.JSON()
|
||||
}
|
||||
func (s *EtcdServer) SelfStats() []byte { return s.stats.JSON() }
|
||||
|
||||
func (s *EtcdServer) LeaderStats() []byte {
|
||||
// TODO(jonboulle): need to lock access to lstats, set it to nil when not leader, ...
|
||||
return s.lstats.JSON()
|
||||
}
|
||||
|
||||
func (s *EtcdServer) StoreStats() []byte {
|
||||
return s.store.JsonStats()
|
||||
}
|
||||
func (s *EtcdServer) StoreStats() []byte { return s.store.JsonStats() }
|
||||
|
||||
func (s *EtcdServer) UpdateRecvApp(from types.ID, length int64) {
|
||||
s.stats.RecvAppendReq(from.String(), int(length))
|
||||
|
@ -503,13 +499,9 @@ func (s *EtcdServer) UpdateMember(ctx context.Context, memb Member) error {
|
|||
}
|
||||
|
||||
// Implement the RaftTimer interface
|
||||
func (s *EtcdServer) Index() uint64 {
|
||||
return atomic.LoadUint64(&s.raftIndex)
|
||||
}
|
||||
func (s *EtcdServer) Index() uint64 { return atomic.LoadUint64(&s.raftIndex) }
|
||||
|
||||
func (s *EtcdServer) Term() uint64 {
|
||||
return atomic.LoadUint64(&s.raftTerm)
|
||||
}
|
||||
func (s *EtcdServer) Term() uint64 { return atomic.LoadUint64(&s.raftTerm) }
|
||||
|
||||
// configure sends a configuration change through consensus and
|
||||
// then waits for it to be applied to the server. It
|
||||
|
|
Loading…
Reference in New Issue