agent

package
v0.28.5 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 24 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.0.16

type Client struct {
	// contains filtered or unexported fields
}

Client runs on the node network side. It connects to proxy server and establishes a stream connection from which it sends and receives network traffic.

func (*Client) Close added in v0.0.16

func (a *Client) Close()

Close closes the Connect gRPC connection.

func (*Client) Connect added in v0.0.16

func (a *Client) Connect() (int, error)

Connect makes the grpc dial to the proxy server. It returns the serverID it connects to.

func (*Client) Recv added in v0.0.16

func (a *Client) Recv() (*client.Packet, error)

func (*Client) Send added in v0.0.16

func (a *Client) Send(pkt *client.Packet) error

func (*Client) Serve added in v0.0.16

func (a *Client) Serve()

Serve starts to serve proxied requests from proxy server over the gRPC stream. Successful Connect is required before Serve. The The requests include things like opening a connection to a server, streaming data and close the connection.

type ClientSet

type ClientSet struct {
	// contains filtered or unexported fields
}

ClientSet consists of clients connected to each instance of an HA proxy server.

func (*ClientSet) AddClient

func (cs *ClientSet) AddClient(serverID string, c *Client) error

func (*ClientSet) ClientsCount

func (cs *ClientSet) ClientsCount() int

func (*ClientSet) HasID

func (cs *ClientSet) HasID(serverID string) bool

func (*ClientSet) HealthyClientsCount

func (cs *ClientSet) HealthyClientsCount() int

func (*ClientSet) Ready added in v0.1.4

func (cs *ClientSet) Ready() bool

func (*ClientSet) RemoveClient

func (cs *ClientSet) RemoveClient(serverID string)

func (*ClientSet) Serve

func (cs *ClientSet) Serve()

type ClientSetConfig

type ClientSetConfig struct {
	Address                 string
	AgentID                 string
	AgentIdentifiers        string
	SyncInterval            time.Duration
	ProbeInterval           time.Duration
	SyncIntervalCap         time.Duration
	DialOptions             []grpc.DialOption
	ServiceAccountTokenPath string
	WarnOnChannelLimit      bool
	SyncForever             bool
}

func (*ClientSetConfig) NewAgentClientSet

func (cc *ClientSetConfig) NewAgentClientSet(stopCh <-chan struct{}) *ClientSet

type DuplicateServerError added in v0.0.27

type DuplicateServerError struct {
	ServerID string
}

func (*DuplicateServerError) Error added in v0.0.27

func (dse *DuplicateServerError) Error() string

type HealthChecker added in v0.1.4

type HealthChecker interface {
	Name() string
	Check(req *http.Request) error
}

HealthChecker represents an entity capable of performing health checks.

var Ping HealthChecker = &ping{}
var ServerConnected HealthChecker = &serverConnected{}

func NewServerConnected added in v0.1.4

func NewServerConnected(cs ReadinessManager) HealthChecker

type ReadinessManager added in v0.1.4

type ReadinessManager interface {
	// Ready returns true the proxy server is ready.
	Ready() bool
}

ReadinessManager supports checking if the agent is ready.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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