Documentation ¶
Index ¶
- type APIClient
- func (client *APIClient) BaseURL() string
- func (client *APIClient) ContainerAttach(ctx context.Context, name string, stdin bool) (net.Conn, *bufio.Reader, error)
- func (client *APIClient) ContainerCheckpointCreate(ctx context.Context, name string, options types.CheckpointCreateOptions) error
- func (client *APIClient) ContainerCheckpointDelete(ctx context.Context, name string, options types.CheckpointDeleteOptions) error
- func (client *APIClient) ContainerCheckpointList(ctx context.Context, name string, options types.CheckpointListOptions) ([]string, error)
- func (client *APIClient) ContainerCommit(ctx context.Context, name string, options types.ContainerCommitOptions) (*types.ContainerCommitResp, error)
- func (client *APIClient) ContainerCreate(ctx context.Context, config types.ContainerConfig, ...) (*types.ContainerCreateResp, error)
- func (client *APIClient) ContainerCreateExec(ctx context.Context, name string, config *types.ExecCreateConfig) (*types.ExecCreateResp, error)
- func (client *APIClient) ContainerExecInspect(ctx context.Context, execID string) (*types.ContainerExecInspect, error)
- func (client *APIClient) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error
- func (client *APIClient) ContainerGet(ctx context.Context, name string) (*types.ContainerJSON, error)
- func (client *APIClient) ContainerKill(ctx context.Context, name string, signal string) error
- func (client *APIClient) ContainerList(ctx context.Context, option types.ContainerListOptions) ([]*types.Container, error)
- func (client *APIClient) ContainerLogs(ctx context.Context, name string, options types.ContainerLogsOptions) (io.ReadCloser, error)
- func (client *APIClient) ContainerPause(ctx context.Context, name string) error
- func (client *APIClient) ContainerRemove(ctx context.Context, name string, options *types.ContainerRemoveOptions) error
- func (client *APIClient) ContainerRename(ctx context.Context, id string, name string) error
- func (client *APIClient) ContainerResize(ctx context.Context, name, height, width string) error
- func (client *APIClient) ContainerRestart(ctx context.Context, name string, timeout string) error
- func (client *APIClient) ContainerStart(ctx context.Context, name string, options types.ContainerStartOptions) error
- func (client *APIClient) ContainerStartExec(ctx context.Context, execID string, config *types.ExecStartConfig) (net.Conn, *bufio.Reader, error)
- func (client *APIClient) ContainerStatPath(ctx context.Context, name string, path string) (types.ContainerPathStat, error)
- func (client *APIClient) ContainerStats(ctx context.Context, name string, stream bool) (io.ReadCloser, error)
- func (client *APIClient) ContainerStop(ctx context.Context, name string, timeout string) error
- func (client *APIClient) ContainerTop(ctx context.Context, name string, arguments []string) (types.ContainerProcessList, error)
- func (client *APIClient) ContainerUnpause(ctx context.Context, name string) error
- func (client *APIClient) ContainerUpdate(ctx context.Context, name string, config *types.UpdateConfig) error
- func (client *APIClient) ContainerUpgrade(ctx context.Context, name string, config *types.ContainerUpgradeConfig) error
- func (client *APIClient) ContainerWait(ctx context.Context, name string) (types.ContainerWaitOKBody, error)
- func (client *APIClient) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
- func (client *APIClient) CopyToContainer(ctx context.Context, container, path string, content io.Reader) error
- func (client *APIClient) DaemonUpdate(ctx context.Context, config *types.DaemonUpdateConfig) error
- func (client *APIClient) Events(ctx context.Context, since string, until string, f filters.Args) (io.ReadCloser, error)
- func (client *APIClient) GetAPIPath(path string, query url.Values) string
- func (client *APIClient) ImageHistory(ctx context.Context, name string) ([]types.HistoryResultItem, error)
- func (client *APIClient) ImageInspect(ctx context.Context, name string) (types.ImageInfo, error)
- func (client *APIClient) ImageList(ctx context.Context, filter filters.Args) ([]types.ImageInfo, error)
- func (client *APIClient) ImageLoad(ctx context.Context, imageName string, reader io.Reader) error
- func (client *APIClient) ImagePull(ctx context.Context, name, tag, encodedAuth string) (io.ReadCloser, error)
- func (client *APIClient) ImagePush(ctx context.Context, ref, encodedAuth string) (io.ReadCloser, error)
- func (client *APIClient) ImageRemove(ctx context.Context, name string, force bool) error
- func (client *APIClient) ImageSave(ctx context.Context, imageName string) (io.ReadCloser, error)
- func (client *APIClient) ImageSearch(ctx context.Context, term, registry, encodedAuth string) ([]types.SearchResultItem, error)
- func (client *APIClient) ImageTag(ctx context.Context, image string, tag string) error
- func (client *APIClient) NetworkConnect(ctx context.Context, network string, req *types.NetworkConnect) error
- func (client *APIClient) NetworkCreate(ctx context.Context, req *types.NetworkCreateConfig) (*types.NetworkCreateResp, error)
- func (client *APIClient) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error
- func (client *APIClient) NetworkInspect(ctx context.Context, networkID string) (*types.NetworkInspectResp, error)
- func (client *APIClient) NetworkList(ctx context.Context) ([]types.NetworkResource, error)
- func (client *APIClient) NetworkRemove(ctx context.Context, networkID string) error
- func (client *APIClient) RegistryLogin(ctx context.Context, auth *types.AuthConfig) (*types.AuthResponse, error)
- func (client *APIClient) SystemInfo(ctx context.Context) (*types.SystemInfo, error)
- func (client *APIClient) SystemPing(ctx context.Context) (string, error)
- func (client *APIClient) SystemVersion(ctx context.Context) (*types.SystemVersion, error)
- func (client *APIClient) UpdateClientVersion(v string)
- func (client *APIClient) VolumeCreate(ctx context.Context, config *types.VolumeCreateConfig) (*types.VolumeInfo, error)
- func (client *APIClient) VolumeInspect(ctx context.Context, name string) (*types.VolumeInfo, error)
- func (client *APIClient) VolumeList(ctx context.Context, filter filters.Args) (*types.VolumeListResp, error)
- func (client *APIClient) VolumeRemove(ctx context.Context, name string) error
- type CommonAPIClient
- type ContainerAPIClient
- type ImageAPIClient
- type NetworkAPIClient
- type RespError
- type Response
- type SystemAPIClient
- type TLSConfig
- type VolumeAPIClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
APIClient is a API client that performs all operations against a pouch server
func (*APIClient) ContainerAttach ¶
func (client *APIClient) ContainerAttach(ctx context.Context, name string, stdin bool) (net.Conn, *bufio.Reader, error)
ContainerAttach attachs a container.
func (*APIClient) ContainerCheckpointCreate ¶
func (client *APIClient) ContainerCheckpointCreate(ctx context.Context, name string, options types.CheckpointCreateOptions) error
ContainerCheckpointCreate creates container checkpoint.
func (*APIClient) ContainerCheckpointDelete ¶
func (client *APIClient) ContainerCheckpointDelete(ctx context.Context, name string, options types.CheckpointDeleteOptions) error
ContainerCheckpointDelete deletes a checkpoint from container
func (*APIClient) ContainerCheckpointList ¶
func (client *APIClient) ContainerCheckpointList(ctx context.Context, name string, options types.CheckpointListOptions) ([]string, error)
ContainerCheckpointList lists all checkpoints of a container
func (*APIClient) ContainerCommit ¶
func (client *APIClient) ContainerCommit(ctx context.Context, name string, options types.ContainerCommitOptions) (*types.ContainerCommitResp, error)
ContainerCommit creates an image from a container.
func (*APIClient) ContainerCreate ¶
func (client *APIClient) ContainerCreate(ctx context.Context, config types.ContainerConfig, hostConfig *types.HostConfig, networkingConfig *types.NetworkingConfig, containerName string) (*types.ContainerCreateResp, error)
ContainerCreate creates a new container based in the given configuration.
func (*APIClient) ContainerCreateExec ¶
func (client *APIClient) ContainerCreateExec(ctx context.Context, name string, config *types.ExecCreateConfig) (*types.ExecCreateResp, error)
ContainerCreateExec creates exec process.
func (*APIClient) ContainerExecInspect ¶
func (client *APIClient) ContainerExecInspect(ctx context.Context, execID string) (*types.ContainerExecInspect, error)
ContainerExecInspect get exec info with a specified exec id.
func (*APIClient) ContainerExecResize ¶
func (client *APIClient) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error
ContainerExecResize changes the size of the tty for an exec process running inside a container.
func (*APIClient) ContainerGet ¶
func (client *APIClient) ContainerGet(ctx context.Context, name string) (*types.ContainerJSON, error)
ContainerGet returns the detailed information of container.
func (*APIClient) ContainerKill ¶
ContainerKill kill a container.
func (*APIClient) ContainerList ¶
func (client *APIClient) ContainerList(ctx context.Context, option types.ContainerListOptions) ([]*types.Container, error)
ContainerList returns the list of containers.
func (*APIClient) ContainerLogs ¶
func (client *APIClient) ContainerLogs(ctx context.Context, name string, options types.ContainerLogsOptions) (io.ReadCloser, error)
ContainerLogs return the logs generated by a container in an io.ReadCloser.
func (*APIClient) ContainerPause ¶
ContainerPause pauses a container.
func (*APIClient) ContainerRemove ¶
func (client *APIClient) ContainerRemove(ctx context.Context, name string, options *types.ContainerRemoveOptions) error
ContainerRemove removes a container.
func (*APIClient) ContainerRename ¶
ContainerRename renames a container.
func (*APIClient) ContainerResize ¶
ContainerResize resizes the size of container tty.
func (*APIClient) ContainerRestart ¶
ContainerRestart restarts a running container.
func (*APIClient) ContainerStart ¶
func (client *APIClient) ContainerStart(ctx context.Context, name string, options types.ContainerStartOptions) error
ContainerStart starts a created container.
func (*APIClient) ContainerStartExec ¶
func (client *APIClient) ContainerStartExec(ctx context.Context, execID string, config *types.ExecStartConfig) (net.Conn, *bufio.Reader, error)
ContainerStartExec starts exec process.
func (*APIClient) ContainerStatPath ¶
func (client *APIClient) ContainerStatPath(ctx context.Context, name string, path string) (types.ContainerPathStat, error)
ContainerStatPath returns Stat information about a path inside the container filesystem.
func (*APIClient) ContainerStats ¶
func (client *APIClient) ContainerStats(ctx context.Context, name string, stream bool) (io.ReadCloser, error)
ContainerStats return the stats related container in an io.ReadCloser.
func (*APIClient) ContainerStop ¶
ContainerStop stops a container.
func (*APIClient) ContainerTop ¶
func (client *APIClient) ContainerTop(ctx context.Context, name string, arguments []string) (types.ContainerProcessList, error)
ContainerTop shows process information from within a container.
func (*APIClient) ContainerUnpause ¶
ContainerUnpause unpauses a container.
func (*APIClient) ContainerUpdate ¶
func (client *APIClient) ContainerUpdate(ctx context.Context, name string, config *types.UpdateConfig) error
ContainerUpdate updates the configurations of a container.
func (*APIClient) ContainerUpgrade ¶
func (client *APIClient) ContainerUpgrade(ctx context.Context, name string, config *types.ContainerUpgradeConfig) error
ContainerUpgrade upgrade a container with new image and args.
func (*APIClient) ContainerWait ¶
func (client *APIClient) ContainerWait(ctx context.Context, name string) (types.ContainerWaitOKBody, error)
ContainerWait pauses execution until a container exits. It returns the API status code as response of its readiness.
func (*APIClient) CopyFromContainer ¶
func (client *APIClient) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
CopyFromContainer gets the content from the container and returns it as a Reader to manipulate it in the host. It's up to the caller to close the reader.
func (*APIClient) CopyToContainer ¶
func (client *APIClient) CopyToContainer(ctx context.Context, container, path string, content io.Reader) error
CopyToContainer copies content into the container filesystem.
func (*APIClient) DaemonUpdate ¶
DaemonUpdate requests daemon to update daemon config.
func (*APIClient) Events ¶
func (client *APIClient) Events(ctx context.Context, since string, until string, f filters.Args) (io.ReadCloser, error)
Events returns a stream of events in the daemon in a ReadClosed. It's up to the caller to close the stream.
func (*APIClient) GetAPIPath ¶
GetAPIPath returns the versioned request path to call the api. It appends the query parameters to the path if they are not empty.
func (*APIClient) ImageHistory ¶
func (client *APIClient) ImageHistory(ctx context.Context, name string) ([]types.HistoryResultItem, error)
ImageHistory requests daemon to get history of an image.
func (*APIClient) ImageInspect ¶
ImageInspect requests daemon to inspect an image.
func (*APIClient) ImageList ¶
func (client *APIClient) ImageList(ctx context.Context, filter filters.Args) ([]types.ImageInfo, error)
ImageList requests daemon to list all images
func (*APIClient) ImagePull ¶
func (client *APIClient) ImagePull(ctx context.Context, name, tag, encodedAuth string) (io.ReadCloser, error)
ImagePull requests daemon to pull an image from registry.
func (*APIClient) ImagePush ¶
func (client *APIClient) ImagePush(ctx context.Context, ref, encodedAuth string) (io.ReadCloser, error)
ImagePush requests daemon to push an image to registry.
func (*APIClient) ImageRemove ¶
ImageRemove deletes an image.
func (*APIClient) ImageSearch ¶
func (client *APIClient) ImageSearch(ctx context.Context, term, registry, encodedAuth string) ([]types.SearchResultItem, error)
ImageSearch requests daemon to search an image from registry.
func (*APIClient) NetworkConnect ¶
func (client *APIClient) NetworkConnect(ctx context.Context, network string, req *types.NetworkConnect) error
NetworkConnect connects a container to a network.
func (*APIClient) NetworkCreate ¶
func (client *APIClient) NetworkCreate(ctx context.Context, req *types.NetworkCreateConfig) (*types.NetworkCreateResp, error)
NetworkCreate creates a network.
func (*APIClient) NetworkDisconnect ¶
func (client *APIClient) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error
NetworkDisconnect disconnect a network from a container.
func (*APIClient) NetworkInspect ¶
func (client *APIClient) NetworkInspect(ctx context.Context, networkID string) (*types.NetworkInspectResp, error)
NetworkInspect inspects a network.
func (*APIClient) NetworkList ¶
NetworkList lists all the networks.
func (*APIClient) NetworkRemove ¶
NetworkRemove removes a network.
func (*APIClient) RegistryLogin ¶
func (client *APIClient) RegistryLogin(ctx context.Context, auth *types.AuthConfig) (*types.AuthResponse, error)
RegistryLogin authenticates the server with a given registry to login.
func (*APIClient) SystemInfo ¶
SystemInfo requests daemon for system info.
func (*APIClient) SystemPing ¶
SystemPing shows whether server is ok.
func (*APIClient) SystemVersion ¶
SystemVersion requests daemon for system version.
func (*APIClient) UpdateClientVersion ¶
UpdateClientVersion sets client version new value.
func (*APIClient) VolumeCreate ¶
func (client *APIClient) VolumeCreate(ctx context.Context, config *types.VolumeCreateConfig) (*types.VolumeInfo, error)
VolumeCreate creates a volume.
func (*APIClient) VolumeInspect ¶
VolumeInspect inspects a volume.
func (*APIClient) VolumeList ¶
func (client *APIClient) VolumeList(ctx context.Context, filter filters.Args) (*types.VolumeListResp, error)
VolumeList returns the list of volumes.
type CommonAPIClient ¶
type CommonAPIClient interface { ContainerAPIClient ImageAPIClient VolumeAPIClient SystemAPIClient NetworkAPIClient }
CommonAPIClient defines common methods of api client
func NewAPIClient ¶
func NewAPIClient(host string, tls TLSConfig) (CommonAPIClient, error)
NewAPIClient initializes a new API client for the given host
type ContainerAPIClient ¶
type ContainerAPIClient interface { ContainerCreate(ctx context.Context, config types.ContainerConfig, hostConfig *types.HostConfig, networkConfig *types.NetworkingConfig, containerName string) (*types.ContainerCreateResp, error) ContainerStart(ctx context.Context, name string, options types.ContainerStartOptions) error ContainerStop(ctx context.Context, name, timeout string) error ContainerKill(ctx context.Context, name, signal string) error ContainerRemove(ctx context.Context, name string, options *types.ContainerRemoveOptions) error ContainerList(ctx context.Context, option types.ContainerListOptions) ([]*types.Container, error) ContainerAttach(ctx context.Context, name string, stdin bool) (net.Conn, *bufio.Reader, error) ContainerCreateExec(ctx context.Context, name string, config *types.ExecCreateConfig) (*types.ExecCreateResp, error) ContainerStartExec(ctx context.Context, execID string, config *types.ExecStartConfig) (net.Conn, *bufio.Reader, error) ContainerExecInspect(ctx context.Context, execID string) (*types.ContainerExecInspect, error) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error ContainerGet(ctx context.Context, name string) (*types.ContainerJSON, error) ContainerRename(ctx context.Context, id string, name string) error ContainerRestart(ctx context.Context, name string, timeout string) error ContainerPause(ctx context.Context, name string) error ContainerUnpause(ctx context.Context, name string) error ContainerUpdate(ctx context.Context, name string, config *types.UpdateConfig) error ContainerUpgrade(ctx context.Context, name string, config *types.ContainerUpgradeConfig) error ContainerTop(ctx context.Context, name string, arguments []string) (types.ContainerProcessList, error) ContainerLogs(ctx context.Context, name string, options types.ContainerLogsOptions) (io.ReadCloser, error) ContainerResize(ctx context.Context, name, height, width string) error ContainerWait(ctx context.Context, name string) (types.ContainerWaitOKBody, error) ContainerCheckpointCreate(ctx context.Context, name string, options types.CheckpointCreateOptions) error ContainerCheckpointList(ctx context.Context, name string, options types.CheckpointListOptions) ([]string, error) ContainerCheckpointDelete(ctx context.Context, name string, options types.CheckpointDeleteOptions) error ContainerCommit(ctx context.Context, name string, options types.ContainerCommitOptions) (*types.ContainerCommitResp, error) ContainerStats(ctx context.Context, name string, stream bool) (io.ReadCloser, error) ContainerStatPath(ctx context.Context, name string, path string) (types.ContainerPathStat, error) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) CopyToContainer(ctx context.Context, container, path string, content io.Reader) error }
ContainerAPIClient defines methods of Container client.
type ImageAPIClient ¶
type ImageAPIClient interface { ImageList(ctx context.Context, filters filters.Args) ([]types.ImageInfo, error) ImageInspect(ctx context.Context, name string) (types.ImageInfo, error) ImagePull(ctx context.Context, name, tag, encodedAuth string) (io.ReadCloser, error) ImageRemove(ctx context.Context, name string, force bool) error ImageTag(ctx context.Context, image string, tag string) error ImageLoad(ctx context.Context, name string, r io.Reader) error ImageSave(ctx context.Context, imageName string) (io.ReadCloser, error) ImageHistory(ctx context.Context, name string) ([]types.HistoryResultItem, error) ImagePush(ctx context.Context, ref, encodedAuth string) (io.ReadCloser, error) ImageSearch(ctx context.Context, term, registry, encodedAuth string) ([]types.SearchResultItem, error) }
ImageAPIClient defines methods of Image client.
type NetworkAPIClient ¶
type NetworkAPIClient interface { NetworkCreate(ctx context.Context, req *types.NetworkCreateConfig) (*types.NetworkCreateResp, error) NetworkRemove(ctx context.Context, networkID string) error NetworkInspect(ctx context.Context, networkID string) (*types.NetworkInspectResp, error) NetworkList(ctx context.Context) ([]types.NetworkResource, error) NetworkConnect(ctx context.Context, network string, req *types.NetworkConnect) error NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error }
NetworkAPIClient defines methods of Network client.
type RespError ¶
type RespError struct {
// contains filtered or unexported fields
}
RespError defines the response error.
type SystemAPIClient ¶
type SystemAPIClient interface { SystemPing(ctx context.Context) (string, error) SystemVersion(ctx context.Context) (*types.SystemVersion, error) SystemInfo(ctx context.Context) (*types.SystemInfo, error) RegistryLogin(ctx context.Context, auth *types.AuthConfig) (*types.AuthResponse, error) DaemonUpdate(ctx context.Context, daemonConfig *types.DaemonUpdateConfig) error Events(ctx context.Context, since string, until string, filters filters.Args) (io.ReadCloser, error) }
SystemAPIClient defines methods of System client.
type TLSConfig ¶
type TLSConfig struct { CA string `json:"tlscacert,omitempty"` Cert string `json:"tlscert,omitempty"` Key string `json:"tlskey,omitempty"` VerifyRemote bool `json:"tlsverify,omitempty"` ManagerWhiteList string `json:"manager-whitelist,omitempty"` }
TLSConfig contains information of tls which users can specify
type VolumeAPIClient ¶
type VolumeAPIClient interface { VolumeCreate(ctx context.Context, config *types.VolumeCreateConfig) (*types.VolumeInfo, error) VolumeRemove(ctx context.Context, name string) error VolumeInspect(ctx context.Context, name string) (*types.VolumeInfo, error) VolumeList(ctx context.Context, filter filters.Args) (*types.VolumeListResp, error) }
VolumeAPIClient defines methods of Volume client.
Source Files ¶
- checkpoint_create.go
- checkpoint_delete.go
- checkpoint_list.go
- client.go
- container_attach.go
- container_commit.go
- container_copy.go
- container_create.go
- container_exec.go
- container_get.go
- container_kill.go
- container_list.go
- container_logs.go
- container_pause.go
- container_remove.go
- container_rename.go
- container_resize.go
- container_restart.go
- container_start.go
- container_stats.go
- container_stop.go
- container_top.go
- container_unpause.go
- container_update.go
- container_upgrade.go
- container_wait.go
- daemon_update.go
- image_history.go
- image_inspect.go
- image_list.go
- image_load.go
- image_pull.go
- image_push.go
- image_remove.go
- image_save.go
- image_search.go
- image_tag.go
- interface.go
- network_connect.go
- network_create.go
- network_disconnect.go
- network_inspect.go
- network_list.go
- network_remove.go
- registry_login.go
- request.go
- system_events.go
- system_info.go
- system_ping.go
- system_version.go
- utils.go
- volume_create.go
- volume_inspect.go
- volume_list.go
- volume_remove.go