appnet

package
v0.0.0-...-b702281 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppNetAgentClient

type AppNetAgentClient struct {
	AppNetClient
	// contains filtered or unexported fields
}

func CreateClient

func CreateClient() *AppNetAgentClient

Client retrieves the singleton Appnet client

func (*AppNetAgentClient) DrainInboundConnections

func (cl *AppNetAgentClient) DrainInboundConnections(adminSocketPath string, drainRequest string) error

DrainInboundConnections invokes Appnet Agent's drain_listeners API which starts draining ServiceConnect inbound connections. This function expects an Appnet-agent-hosted HTTP server listening on the UDS path passed in config.

func (*AppNetAgentClient) GetStats

func (cl *AppNetAgentClient) GetStats(adminSocketPath string, statsRequest string) (map[string]*prometheus.MetricFamily, error)

GetStats invokes Appnet Agent's stats API to retrieve ServiceConnect stats in prometheus format. This function expects an Appnet-Agent-hosted HTTP server listening on the UDS path passed in config.

type AppNetClient

type AppNetClient interface {
	GetStats(adminSocketPath string, statsRequest string) (map[string]*prometheus.MetricFamily, error)
	DrainInboundConnections(adminSocketPath string, drainRequest string) error
}

AppnetClient is an interface with customized Appnet client that implements the GetStats and DrainInboundConnections

Directories

Path Synopsis
Package mock_appnet is a generated GoMock package.
Package mock_appnet is a generated GoMock package.

Jump to

Keyboard shortcuts

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