Documentation
¶
Index ¶
- type NodeClient
- type Pool
- func (p *Pool) CheckHealth(ctx context.Context) (map[string]*pb.DaemonStatus, error)
- func (p *Pool) Close() error
- func (p *Pool) Connect(ctx context.Context, node *models.Node) error
- func (p *Pool) ConnectAll(ctx context.Context, nodes []*models.Node) error
- func (p *Pool) Count() int
- func (p *Pool) GetAllClients() []*NodeClient
- func (p *Pool) GetClient(nodeID string) (*NodeClient, error)
- func (p *Pool) Initialize(ctx context.Context, config *pb.InitializeRequest) error
- func (p *Pool) IsConnected(nodeID string) bool
- func (p *Pool) StopAll(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeClient ¶
type NodeClient struct {
Node *models.Node
Conn *grpc.ClientConn
Client pb.DaemonServiceClient
}
NodeClient wraps a gRPC connection to a daemon
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool manages gRPC connections to multiple daemons
func (*Pool) CheckHealth ¶
CheckHealth checks the health of all connected nodes
func (*Pool) ConnectAll ¶
ConnectAll establishes connections to all nodes
func (*Pool) GetAllClients ¶
func (p *Pool) GetAllClients() []*NodeClient
GetAllClients returns all connected clients
func (*Pool) GetClient ¶
func (p *Pool) GetClient(nodeID string) (*NodeClient, error)
GetClient returns the client for a node
func (*Pool) Initialize ¶
Initialize initializes all connected daemons
func (*Pool) IsConnected ¶
IsConnected checks if a node is connected
Click to show internal directories.
Click to hide internal directories.