Documentation
¶
Index ¶
- func Recv(conn client.Connection, nodeID string, snapshot *Snapshot) error
- func Send(conn client.Connection, serviceID string) (string, error)
- type Snapshot
- type SnapshotHandler
- type SnapshotListener
- func (l *SnapshotListener) Done()
- func (l *SnapshotListener) GetPath(nodes ...string) string
- func (l *SnapshotListener) PostProcess(p map[string]struct{})
- func (l *SnapshotListener) Ready() (err error)
- func (l *SnapshotListener) SetConnection(conn client.Connection)
- func (l *SnapshotListener) Spawn(shutdown <-chan interface{}, nodeID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Snapshot ¶
type Snapshot struct { ServiceID string Label string Err string // contains filtered or unexported fields }
Snapshot is the snapshot request object
func (*Snapshot) SetVersion ¶
func (s *Snapshot) SetVersion(version interface{})
SetVersion implements client.Node
type SnapshotHandler ¶
SnapshotHandler is the handler interface for running a snapshot listener
type SnapshotListener ¶
type SnapshotListener struct {
// contains filtered or unexported fields
}
SnapshotListener is the zk listener for snapshots
func NewSnapshotListener ¶
func NewSnapshotListener(handler SnapshotHandler) *SnapshotListener
NewSnapshotListener instantiates a new listener for snapshots
func (*SnapshotListener) GetPath ¶
func (l *SnapshotListener) GetPath(nodes ...string) string
GetPath implements zzk.Listener
func (*SnapshotListener) PostProcess ¶
func (l *SnapshotListener) PostProcess(p map[string]struct{})
PostProcess implements zzk.Listener
func (*SnapshotListener) Ready ¶
func (l *SnapshotListener) Ready() (err error)
Ready implements zzk.Listener
func (*SnapshotListener) SetConnection ¶
func (l *SnapshotListener) SetConnection(conn client.Connection)
SetConnection implements zzk.Listener
func (*SnapshotListener) Spawn ¶
func (l *SnapshotListener) Spawn(shutdown <-chan interface{}, nodeID string)
Spawn takes a snapshot of a service and waits for the node to be deleted. If the node is not removed, then no action is performed.
Click to show internal directories.
Click to hide internal directories.