agentclient

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 cached gRPC connections to node agents.

func NewPool

func NewPool(token string, transport security.ClientTransportConfig) *Pool

NewPool creates a new connection pool with the given auth token.

func (*Pool) Close

func (p *Pool) Close()

Close closes all cached connections.

func (*Pool) GetClient

func (p *Pool) GetClient(address string, serverNameOverride ...string) (pb.NodeAgentClient, error)

GetClient returns a NodeAgent client for the given address, reusing connections. Automatically reconnects if the cached connection is in a failed state.

func (*Pool) ResetConnection

func (p *Pool) ResetConnection(address string)

ResetConnection drops the cached connection for an address, forcing a fresh dial on next use.

Jump to

Keyboard shortcuts

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