client

package
v0.0.0-...-84b45fd Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CBDockerClient

type CBDockerClient struct {
	*dockerClient.Client
	// contains filtered or unexported fields
}

func New

func New() (*CBDockerClient, error)

func (*CBDockerClient) CleanUp

func (cli *CBDockerClient) CleanUp(ctx context.Context, prefix string) error

func (*CBDockerClient) CreateCBNetwork

func (cli *CBDockerClient) CreateCBNetwork(ctx context.Context, networkName string) (types.NetworkResource, error)

func (*CBDockerClient) CreateCBNodes

func (cli *CBDockerClient) CreateCBNodes(ctx context.Context, imgName string, prefix string, cbNet types.NetworkResource, size int) ([]types.ContainerJSON, error)

func (*CBDockerClient) DeleteCBNetworks

func (cli *CBDockerClient) DeleteCBNetworks(ctx context.Context, prefix string) error

Deletes all networks starting with the cluster prefix.

func (*CBDockerClient) DeleteCBServers

func (cli *CBDockerClient) DeleteCBServers(ctx context.Context, clusterPrefix string) error

Deletes all docker containers that have the cluster prefix.

func (*CBDockerClient) DeleteProxy

func (cli *CBDockerClient) DeleteProxy(ctx context.Context) error

func (*CBDockerClient) ExecCmd

func (cli *CBDockerClient) ExecCmd(ctx context.Context, containerID string, cmd []string) (string, error)

func (*CBDockerClient) GetCBServerContainers

func (cli *CBDockerClient) GetCBServerContainers(ctx context.Context, clusterPrefix string) ([]types.Container, error)

func (*CBDockerClient) ImagePullAndWait

func (cli *CBDockerClient) ImagePullAndWait(ctx context.Context, imageName string, opts types.ImagePullOptions) error

func (*CBDockerClient) InitCBNode

func (cli *CBDockerClient) InitCBNode(ctx context.Context, container types.ContainerJSON, clusterName, username, password string) error

func (*CBDockerClient) JoinCBCluster

func (cli *CBDockerClient) JoinCBCluster(ctx context.Context, containerID string, servers []string, username, password string) error

func (*CBDockerClient) RebalanceCBCluster

func (cli *CBDockerClient) RebalanceCBCluster(ctx context.Context, containerID, username, password string) error

func (*CBDockerClient) RunProxy

func (cli *CBDockerClient) RunProxy(ctx context.Context, netwrk types.NetworkResource, localPort, targetIP, targetPort string) error

Creates a container to act as a proxy, forwarding remote ports on another container to local ports on the host.

Jump to

Keyboard shortcuts

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