Documentation ¶
Index ¶
- type Client
- type ClientSet
- func (cs *ClientSet) AddClient(serverID string, c *Client) error
- func (cs *ClientSet) ClientsCount() int
- func (cs *ClientSet) HasID(serverID string) bool
- func (cs *ClientSet) HealthyClientsCount() int
- func (cs *ClientSet) Ready() bool
- func (cs *ClientSet) RemoveClient(serverID string)
- func (cs *ClientSet) Serve()
- type ClientSetConfig
- type DuplicateServerError
- type HealthChecker
- type ReadinessManager
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
Connect makes the grpc dial to the proxy server. It returns the serverID it connects to.
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) ClientsCount ¶
func (*ClientSet) HealthyClientsCount ¶
func (*ClientSet) RemoveClient ¶
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
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.