nodemanager

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2023 License: LGPL-3.0 Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL