network

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMockCPUClient

func GetMockCPUClient(status *v1.StatusResponse, err error) v1.CPUClient

func GetMockDockerClient

func GetMockDockerClient(status *v1.StatusResponse, err error) v1.DockerClient

func GetMockNetworkClient

func GetMockNetworkClient(status *v1.StatusResponse, err error) v1.NetworkClient

func GetMockServerClient

func GetMockServerClient(status *v1.StatusResponse, err error) v1.ServerClient

func GetMockServiceClient

func GetMockServiceClient(status *v1.StatusResponse, err error) v1.ServiceClient

Types

type Connection

type Connection interface {
	GetServiceClient(target string) (v1.ServiceClient, error)
	GetDockerClient(target string) (v1.DockerClient, error)
	GetCPUClient(target string) (v1.CPUClient, error)
	GetServerClient(target string) (v1.ServerClient, error)
	GetNetworkClient(target string) (v1.NetworkClient, error)
	GetHealthClient(target string) (v1.HealthClient, error)
}

type Connections

type Connections struct {
	Pool map[string]Connection
}

func GetConnectionPool

func GetConnectionPool(config *config.Config, logger log.Logger) *Connections

type MockConnection

type MockConnection struct {
	Status *v1.StatusResponse
	Err    error
}

func (*MockConnection) GetCPUClient

func (connection *MockConnection) GetCPUClient(string) (v1.CPUClient, error)

func (*MockConnection) GetDockerClient

func (connection *MockConnection) GetDockerClient(string) (v1.DockerClient, error)

func (*MockConnection) GetHealthClient

func (connection *MockConnection) GetHealthClient(string) (v1.HealthClient, error)

func (*MockConnection) GetNetworkClient

func (connection *MockConnection) GetNetworkClient(string) (v1.NetworkClient, error)

func (*MockConnection) GetServerClient

func (connection *MockConnection) GetServerClient(string) (v1.ServerClient, error)

func (*MockConnection) GetServiceClient

func (connection *MockConnection) GetServiceClient(string) (v1.ServiceClient, error)

type MockFailedConnection

type MockFailedConnection struct {
	Err error
}

func (*MockFailedConnection) GetCPUClient

func (failedConnection *MockFailedConnection) GetCPUClient(string) (v1.CPUClient, error)

func (*MockFailedConnection) GetDockerClient

func (failedConnection *MockFailedConnection) GetDockerClient(string) (v1.DockerClient, error)

func (*MockFailedConnection) GetHealthClient

func (failedConnection *MockFailedConnection) GetHealthClient(string) (v1.HealthClient, error)

func (*MockFailedConnection) GetNetworkClient

func (failedConnection *MockFailedConnection) GetNetworkClient(string) (v1.NetworkClient, error)

func (*MockFailedConnection) GetServerClient

func (failedConnection *MockFailedConnection) GetServerClient(string) (v1.ServerClient, error)

func (*MockFailedConnection) GetServiceClient

func (failedConnection *MockFailedConnection) GetServiceClient(string) (v1.ServiceClient, error)

type Options

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

Jump to

Keyboard shortcuts

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