Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReaderNodePool ¶
type ReaderNodePool struct {
// contains filtered or unexported fields
}
ReaderNodePool is a pool of nodes.
func NewReaderNodePool ¶
func NewReaderNodePool() *ReaderNodePool
func (*ReaderNodePool) GetReaders ¶
func (p *ReaderNodePool) GetReaders() []*pb.NodeId
func (*ReaderNodePool) OffLine ¶
func (p *ReaderNodePool) OffLine(uuid string)
OffLine marks a node as offline.
func (*ReaderNodePool) Update ¶
func (p *ReaderNodePool) Update(nodeId *pb.NodeId)
type WriterNodePool ¶
type WriterNodePool struct {
// contains filtered or unexported fields
}
WriterNodePool is a pool of nodes.
func NewWriterNodePool ¶
func NewWriterNodePool(s3Client *s3.Client, bucket, prefix string) *WriterNodePool
NewWriterNodePool creates a new NodePool.
func (*WriterNodePool) GetLeader ¶
func (p *WriterNodePool) GetLeader() *pb.NodeId
GetLeader returns the leader node.
func (*WriterNodePool) OffLine ¶
func (p *WriterNodePool) OffLine(uuid string)
OffLine marks a node as offline.
func (*WriterNodePool) SetLeader ¶
func (p *WriterNodePool) SetLeader(id *pb.NodeId)
SetLeader sets the leader role.
func (*WriterNodePool) Subscribe ¶
func (p *WriterNodePool) Subscribe() chan *pb.WriterEventResponse
Subscribe subscribes to the event broker.
func (*WriterNodePool) Update ¶
func (p *WriterNodePool) Update(node *pb.NodeId)
Update updates the pool with a new node.
Click to show internal directories.
Click to hide internal directories.