Versions in this module Expand all Collapse all v1 v1.0.4 Jul 22, 2024 v1.0.3 Jul 22, 2024 v1.0.2 Jul 22, 2024 v1.0.1 Jul 18, 2024 Changes in this version + func WithEventCallback(cb zk.EventCallback) zkConnOpt + type Node struct + Address string + Alive bool + Host string + ID string + Kinds []string + Meta map[string]string + Name string + Port int + func NewNode(name, host string, port int, kinds []string) *Node + func (n *Node) Deserialize(data []byte) error + func (n *Node) Equal(other *Node) bool + func (n *Node) GetAddress() (host string, port int) + func (n *Node) GetAddressString() string + func (n *Node) GetMeta(name string) (string, bool) + func (n *Node) GetSeq() int + func (n *Node) MemberStatus() *cluster.Member + func (n *Node) Serialize() ([]byte, error) + func (n *Node) SetMeta(name string, val string) + type OnRoleChangedFunc func(RoleType) + func (fn OnRoleChangedFunc) OnRoleChanged(rt RoleType) + type Option func(*config) + func WithAuth(scheme string, credential string) Option + func WithBaseKey(key string) Option + func WithRoleChangedFunc(f OnRoleChangedFunc) Option + func WithRoleChangedListener(l RoleChangedListener) Option + func WithSessionTimeout(tm time.Duration) Option + type Provider struct + func New(endpoints []string, opts ...Option) (*Provider, error) + func (p *Provider) GetHealthStatus() error + func (p *Provider) IsLeader() bool + func (p *Provider) Shutdown(graceful bool) error + func (p *Provider) StartClient(c *cluster.Cluster) error + func (p *Provider) StartMember(c *cluster.Cluster) error + type RoleChangedListener interface + OnRoleChanged func(RoleType) + type RoleType int + const Follower + const Leader + func (r RoleType) String() string + type SingletonScheduler struct + func NewSingletonScheduler(rc *actor.RootContext) *SingletonScheduler + func (s *SingletonScheduler) FromFunc(f actor.ReceiveFunc) *SingletonScheduler + func (s *SingletonScheduler) FromProducer(f actor.Producer) *SingletonScheduler + func (s *SingletonScheduler) OnRoleChanged(rt RoleType)