Documentation
¶
Overview ¶
Package agentclient provides a connection pool for the epochd node agent's gRPC API. One gRPC connection is maintained per node IP and reused across calls. Connections are created lazily on first use and closed by Close.
Index ¶
- type Pool
- func (p *Pool) Close()
- func (p *Pool) GetStatus(ctx context.Context, nodeIP, handleID string) (*api.HandleStatus, error)
- func (p *Pool) Inject(ctx context.Context, nodeIP, containerID string, target time.Time, freeze bool) (string, error)
- func (p *Pool) Reset(ctx context.Context, nodeIP, handleID string) error
- func (p *Pool) SetTime(ctx context.Context, nodeIP, handleID string, target time.Time, freeze bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool manages gRPC connections to node agents, keyed by "nodeIP:port".
func (*Pool) GetStatus ¶
GetStatus calls the agent's Status RPC and returns the live injection state.
func (*Pool) Inject ¶
func (p *Pool) Inject(ctx context.Context, nodeIP, containerID string, target time.Time, freeze bool) (string, error)
Inject calls the agent's Inject RPC on the node at nodeIP. When freeze is true the agent starts the clock in freeze mode.
Click to show internal directories.
Click to hide internal directories.