Documentation ¶
Index ¶
- Constants
- type MembershipList
- type MembershipService
- func (ms *MembershipService) GetMembershipList() []string
- func (ms *MembershipService) JoinGroup()
- func (ms *MembershipService) LeaveGroup()
- func (ms *MembershipService) ListMembers() []string
- func (ms *MembershipService) ListSelf() string
- func (ms *MembershipService) StartIntroducer()
- func (ms *MembershipService) StartService(portNum string, lossRate int)
Constants ¶
View Source
const ( JOINGOSSIP int = 2 LEAVE int = 3 FAIL int = 4 HEARTBEAT int = 5 MASTER int = 6 ELECTION int = 7 OK int = 8 )
Type of messages
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MembershipList ¶
type MembershipList struct {
// contains filtered or unexported fields
}
type MembershipService ¶
type MembershipService struct { Successors []string // 4 successors Predecessors []string // 3 predecessors LeaveReportChan chan string // leave report channel FailReportChan chan string // failure report channel JoinReportChan chan string // join report channel // contains filtered or unexported fields }
func (*MembershipService) GetMembershipList ¶
func (ms *MembershipService) GetMembershipList() []string
func (*MembershipService) JoinGroup ¶
func (ms *MembershipService) JoinGroup()
func (*MembershipService) LeaveGroup ¶
func (ms *MembershipService) LeaveGroup()
func (*MembershipService) ListMembers ¶
func (ms *MembershipService) ListMembers() []string
func (*MembershipService) ListSelf ¶
func (ms *MembershipService) ListSelf() string
func (*MembershipService) StartIntroducer ¶
func (ms *MembershipService) StartIntroducer()
StartIntroducer starts introducer service
func (*MembershipService) StartService ¶
func (ms *MembershipService) StartService(portNum string, lossRate int)
StartService starts membership service
Click to show internal directories.
Click to hide internal directories.