Documentation ¶
Index ¶
- Constants
- type Clerk
- type Config
- type JoinArgs
- type JoinReply
- type LeaveArgs
- type LeaveReply
- type MoveArgs
- type MoveReply
- type Op
- type OpType
- type QueryArgs
- type QueryReply
- type ShardMaster
- func (sm *ShardMaster) Join(args *JoinArgs, reply *JoinReply) error
- func (sm *ShardMaster) Kill()
- func (sm *ShardMaster) Leave(args *LeaveArgs, reply *LeaveReply) error
- func (sm *ShardMaster) Move(args *MoveArgs, reply *MoveReply) error
- func (sm *ShardMaster) Query(args *QueryArgs, reply *QueryReply) error
- func (sm *ShardMaster) WaitForAgreement(seq int) interface{}
Constants ¶
View Source
const NShards = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LeaveReply ¶
type LeaveReply struct { }
type QueryReply ¶
type QueryReply struct {
Config Config
}
type ShardMaster ¶
type ShardMaster struct {
// contains filtered or unexported fields
}
func StartServer ¶
func StartServer(servers []string, me int) *ShardMaster
servers[] contains the ports of the set of servers that will cooperate via Paxos to form the fault-tolerant shardmaster service. me is the index of the current server in servers[].
func (*ShardMaster) Leave ¶
func (sm *ShardMaster) Leave(args *LeaveArgs, reply *LeaveReply) error
func (*ShardMaster) Query ¶
func (sm *ShardMaster) Query(args *QueryArgs, reply *QueryReply) error
func (*ShardMaster) WaitForAgreement ¶
func (sm *ShardMaster) WaitForAgreement(seq int) interface{}
Click to show internal directories.
Click to hide internal directories.