Versions in this module Expand all Collapse all v0 v0.1.0 Jul 8, 2015 Changes in this version + const InternalQueryPrefix + const ProtocolVersionMax + const ProtocolVersionMin + const QueryResponseSizeLimit + const QuerySizeLimit + const UserEventSizeLimit + var FeatureNotSupported = fmt.Errorf("Feature not supported") + var ProtocolVersionMap map[uint8]uint8 + type Config struct + BroadcastTimeout time.Duration + CoalescePeriod time.Duration + EnableNameConflictResolution bool + EventBuffer int + EventCh chan<- Event + KeyringFile string + LogOutput io.Writer + MaxQueueDepth int + MemberlistConfig *memberlist.Config + Merge MergeDelegate + NodeName string + ProtocolVersion uint8 + QueryBuffer int + QueryTimeoutMult int + QueueDepthWarning int + QuiescentPeriod time.Duration + ReapInterval time.Duration + RecentIntentBuffer int + ReconnectInterval time.Duration + ReconnectTimeout time.Duration + RejoinAfterLeave bool + SnapshotPath string + Tags map[string]string + TombstoneTimeout time.Duration + UserCoalescePeriod time.Duration + UserQuiescentPeriod time.Duration + func DefaultConfig() *Config + func (c *Config) Init() + type Event interface + EventType func() EventType + String func() string + type EventType int + const EventMemberFailed + const EventMemberJoin + const EventMemberLeave + const EventMemberReap + const EventMemberUpdate + const EventQuery + const EventUser + func (t EventType) String() string + type KeyManager struct + func (k *KeyManager) InstallKey(key string) (*KeyResponse, error) + func (k *KeyManager) ListKeys() (*KeyResponse, error) + func (k *KeyManager) RemoveKey(key string) (*KeyResponse, error) + func (k *KeyManager) UseKey(key string) (*KeyResponse, error) + type KeyResponse struct + Keys map[string]int + Messages map[string]string + NumErr int + NumNodes int + NumResp int + type LamportClock struct + func (l *LamportClock) Increment() LamportTime + func (l *LamportClock) Time() LamportTime + func (l *LamportClock) Witness(v LamportTime) + type LamportTime uint64 + type Member struct + Addr net.IP + DelegateCur uint8 + DelegateMax uint8 + DelegateMin uint8 + Name string + Port uint16 + ProtocolCur uint8 + ProtocolMax uint8 + ProtocolMin uint8 + Status MemberStatus + Tags map[string]string + type MemberEvent struct + Members []Member + Type EventType + func (m MemberEvent) EventType() EventType + func (m MemberEvent) String() string + type MemberStatus int + const StatusAlive + const StatusFailed + const StatusLeaving + const StatusLeft + const StatusNone + func (s MemberStatus) String() string + type MergeDelegate interface + NotifyMerge func([]*Member) error + type NodeResponse struct + From string + Payload []byte + type PreviousNode struct + Addr string + Name string + func (p PreviousNode) String() string + type Query struct + LTime LamportTime + Name string + Payload []byte + func (q *Query) Deadline() time.Time + func (q *Query) EventType() EventType + func (q *Query) Respond(buf []byte) error + func (q *Query) String() string + type QueryParam struct + FilterNodes []string + FilterTags map[string]string + RequestAck bool + Timeout time.Duration + type QueryResponse struct + func (r *QueryResponse) AckCh() <-chan string + func (r *QueryResponse) Close() + func (r *QueryResponse) Deadline() time.Time + func (r *QueryResponse) Finished() bool + func (r *QueryResponse) ResponseCh() <-chan NodeResponse + type Serf struct + func Create(conf *Config) (*Serf, error) + func (s *Serf) DefaultQueryParams() *QueryParam + func (s *Serf) DefaultQueryTimeout() time.Duration + func (s *Serf) EncryptionEnabled() bool + func (s *Serf) Join(existing []string, ignoreOld bool) (int, error) + func (s *Serf) KeyManager() *KeyManager + func (s *Serf) Leave() error + func (s *Serf) LocalMember() Member + func (s *Serf) Memberlist() *memberlist.Memberlist + func (s *Serf) Members() []Member + func (s *Serf) ProtocolVersion() uint8 + func (s *Serf) Query(name string, payload []byte, params *QueryParam) (*QueryResponse, error) + func (s *Serf) RemoveFailedNode(node string) error + func (s *Serf) SetTags(tags map[string]string) error + func (s *Serf) Shutdown() error + func (s *Serf) ShutdownCh() <-chan struct{} + func (s *Serf) State() SerfState + func (s *Serf) Stats() map[string]string + func (s *Serf) UserEvent(name string, payload []byte, coalesce bool) error + type SerfState int + const SerfAlive + const SerfLeaving + const SerfLeft + const SerfShutdown + func (s SerfState) String() string + type Snapshotter struct + func NewSnapshotter(path string, maxSize int, rejoinAfterLeave bool, logger *log.Logger, ...) (chan<- Event, *Snapshotter, error) + func (s *Snapshotter) AliveNodes() []*PreviousNode + func (s *Snapshotter) LastClock() LamportTime + func (s *Snapshotter) LastEventClock() LamportTime + func (s *Snapshotter) LastQueryClock() LamportTime + func (s *Snapshotter) Leave() + func (s *Snapshotter) Wait() + type UserEvent struct + Coalesce bool + LTime LamportTime + Name string + Payload []byte + func (u UserEvent) EventType() EventType + func (u UserEvent) String() string