agentclient

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 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 Endpoint added in v0.9.0

type Endpoint struct {
	Address       string
	TLSServerName string
}

Endpoint identifies a node agent without deriving its TLS identity from its network address.

func (Endpoint) ValidateStrict added in v0.9.0

func (e Endpoint) ValidateStrict() error

ValidateStrict rejects endpoints that could fall back to address-derived certificate verification.

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) GetEndpointClient added in v0.9.0

func (p *Pool) GetEndpointClient(endpoint Endpoint) (pb.NodeAgentClient, error)

GetEndpointClient returns a client for an endpoint with an explicit TLS identity. It never uses the pool's address-derived server-name fallback.

func (*Pool) ResetConnection

func (p *Pool) ResetConnection(address string)

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

func (*Pool) ResetEndpoint added in v0.9.0

func (p *Pool) ResetEndpoint(endpoint Endpoint)

ResetEndpoint drops only the cached connection for the exact address and TLS identity pair.

Jump to

Keyboard shortcuts

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