Documentation ¶
Index ¶
- type ChildrenInput
- type Client
- type ClientFactory
- type CreateInput
- type Curator
- type DeleteInput
- type FakeClientID
- type FakeSessionState
- type FakeZookeeper
- func (s *FakeZookeeper) Begin(clientID FakeClientID)
- func (s *FakeZookeeper) ChildrenApply(clientID FakeClientID)
- func (s *FakeZookeeper) ConnError(clientID FakeClientID)
- func (s *FakeZookeeper) CreateApply(clientID FakeClientID)
- func (s *FakeZookeeper) CreateApplyError(clientID FakeClientID)
- func (s *FakeZookeeper) CreateCall(clientID FakeClientID) CreateInput
- func (s *FakeZookeeper) DeleteApply(clientID FakeClientID)
- func (s *FakeZookeeper) GetApply(clientID FakeClientID)
- func (s *FakeZookeeper) PendingCalls(clientID FakeClientID) []string
- func (s *FakeZookeeper) PrintData()
- func (s *FakeZookeeper) PrintPendingCalls()
- func (s *FakeZookeeper) Retry(clientID FakeClientID)
- func (s *FakeZookeeper) SessionExpired(clientID FakeClientID)
- func (s *FakeZookeeper) SetApply(clientID FakeClientID)
- type GetInput
- type RetryInput
- type Session
- type SessionCallback
- type SessionRunner
- type SetInput
- type ZNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChildrenInput ¶
type Client ¶
type Client interface { Get(path string, callback func(resp zk.GetResponse, err error)) GetW(path string, callback func(resp zk.GetResponse, err error), watcher func(ev zk.Event), ) Children(path string, callback func(resp zk.ChildrenResponse, err error)) ChildrenW(path string, callback func(resp zk.ChildrenResponse, err error), watcher func(ev zk.Event), ) Create( path string, data []byte, flags int32, callback func(resp zk.CreateResponse, err error), ) Set( path string, data []byte, version int32, callback func(resp zk.SetResponse, err error), ) Delete(path string, version int32, callback func(resp zk.DeleteResponse, err error)) }
type ClientFactory ¶
type ClientFactory interface { Start(runner SessionRunner) Close() }
func NewClientFactory ¶
func NewClientFactory(servers []string, username string, password string) ClientFactory
func NewFakeClientFactory ¶
func NewFakeClientFactory(store *FakeZookeeper, clientID FakeClientID) ClientFactory
type CreateInput ¶
type Curator ¶
type Curator struct {
// contains filtered or unexported fields
}
func NewChain ¶
func NewChain( initFuncList ...SessionCallback, ) *Curator
type DeleteInput ¶
type DeleteInput struct { Path string Version int32 Callback func(resp zk.DeleteResponse, err error) }
type FakeClientID ¶
type FakeClientID string
type FakeSessionState ¶
type FakeZookeeper ¶
type FakeZookeeper struct { States map[FakeClientID]*FakeSessionState Sessions map[FakeClientID]SessionRunner Clients map[FakeClientID]Client Pending map[FakeClientID][]any Root *ZNode // root znode NextSessionID int64 Zxid int64 }
func NewFakeZookeeper ¶
func NewFakeZookeeper() *FakeZookeeper
func (*FakeZookeeper) Begin ¶
func (s *FakeZookeeper) Begin(clientID FakeClientID)
func (*FakeZookeeper) ChildrenApply ¶
func (s *FakeZookeeper) ChildrenApply(clientID FakeClientID)
func (*FakeZookeeper) ConnError ¶
func (s *FakeZookeeper) ConnError(clientID FakeClientID)
func (*FakeZookeeper) CreateApply ¶
func (s *FakeZookeeper) CreateApply(clientID FakeClientID)
func (*FakeZookeeper) CreateApplyError ¶
func (s *FakeZookeeper) CreateApplyError(clientID FakeClientID)
func (*FakeZookeeper) CreateCall ¶
func (s *FakeZookeeper) CreateCall(clientID FakeClientID) CreateInput
func (*FakeZookeeper) DeleteApply ¶
func (s *FakeZookeeper) DeleteApply(clientID FakeClientID)
func (*FakeZookeeper) GetApply ¶
func (s *FakeZookeeper) GetApply(clientID FakeClientID)
func (*FakeZookeeper) PendingCalls ¶
func (s *FakeZookeeper) PendingCalls(clientID FakeClientID) []string
func (*FakeZookeeper) PrintData ¶
func (s *FakeZookeeper) PrintData()
func (*FakeZookeeper) PrintPendingCalls ¶
func (s *FakeZookeeper) PrintPendingCalls()
func (*FakeZookeeper) Retry ¶
func (s *FakeZookeeper) Retry(clientID FakeClientID)
func (*FakeZookeeper) SessionExpired ¶
func (s *FakeZookeeper) SessionExpired(clientID FakeClientID)
func (*FakeZookeeper) SetApply ¶
func (s *FakeZookeeper) SetApply(clientID FakeClientID)
type RetryInput ¶
type RetryInput struct { }
type SessionCallback ¶
type SessionRunner ¶
type SessionRunner interface { Begin(client Client) Retry() End() }
func NewParallelRunner ¶
func NewParallelRunner(runners ...SessionRunner) SessionRunner
Click to show internal directories.
Click to hide internal directories.