Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( errors.New("service is unavailable") )ErrServiceUnavailable =
Functions ¶
This section is empty.
Types ¶
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
Master is the master of a raft group
var Default *Master
Default for the default master
func (*Master) PeerHTTPAddr ¶
PeerHTTPAddr get the httpAddr for the raft
func (*Master) RegisterPeer ¶
RegisterPeer register peer
func (*Master) UpdatePeers ¶
UpdatePeers updatePeers into store
type ShardMaster ¶
type ShardMaster interface { Join(member Member) error Leave(member Member) error Move(shardIndex int, member Member) error Query(key string) (members [][]string, err error) }
ShardMaster as shard master
func NewShardMasterServer ¶
func NewShardMasterServer() (ShardMaster, error)
NewShardMasterServer allocates and returns a new shardMasterServer
Click to show internal directories.
Click to hide internal directories.