Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions event_delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ const (
NodeUpdate
)

func (net NodeEventType) String() string {
return []string{"NodeJoin", "NodeLeave", "NodeUpdate"}[net]
}

// NodeEvent is a single event related to node activity in the memberlist.
// The Node member of this struct must not be directly modified. It is passed
// as a pointer to avoid unnecessary copies. If you wish to modify the node,
Expand Down
4 changes: 4 additions & 0 deletions state.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const (
StateLeft
)

func (nst NodeStateType) String() string {
return []string{"StateAlive", "StateSuspect", "StateDead", "StateLeft"}[nst]
}

// Node represents a node in the cluster.
type Node struct {
Name string
Expand Down