Documentation ¶
Index ¶
- type Client
- func (c *Client) Container() *Container
- func (c *Client) Docker() *Docker
- func (c *Client) Image() *Image
- func (c *Client) Network() *Network
- func (c *Client) Node() *Node
- func (c *Client) Proc() *Proc
- func (c *Client) Project() *Project
- func (c *Client) Resource() *Resource
- func (c *Client) Service() *Service
- func (c *Client) Stack() *Stack
- func (c *Client) Swarm() *Swarm
- func (c *Client) Volume() *Volume
- type Container
- func (c *Container) Inspect(ctx context.Context, containerID string) (types.ContainerJSON, []byte, error)
- func (c *Container) List(ctx context.Context) ([]types.Container, error)
- func (c *Container) Logs(ctx context.Context, containerID string, since, until time.Time) ([]byte, error)
- func (c *Container) Stats(ctx context.Context, containerID string) (*types.Stats, string, error)
- func (c *Container) StatsAll(ctx context.Context) ([]*types.Stats, error)
- type Docker
- type Image
- func (i *Image) List(ctx context.Context) ([]types.ImageSummary, error)
- func (i *Image) Pull(ctx context.Context, refStr string) error
- func (i *Image) Remove(ctx context.Context, id string) ([]types.ImageDeleteResponseItem, error)
- func (i *Image) Tag(ctx context.Context, source, target string) error
- type Network
- func (s *Network) Connect(ctx context.Context, networkID, containerID string, ...) error
- func (s *Network) Create(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)
- func (s *Network) Disconnect(ctx context.Context, networkID, containerID string, force bool) error
- func (s *Network) Inspect(ctx context.Context, networkID string, options types.NetworkInspectOptions) (types.NetworkResource, []byte, error)
- func (s *Network) List(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)
- func (s *Network) Prune(ctx context.Context, pruneFilters filters.Args) (types.NetworksPruneReport, error)
- func (s *Network) Remove(ctx context.Context, networkID string) error
- type Node
- type Proc
- type Project
- func (p *Project) Deploy(ctx context.Context, project *proto.ReqProject) (err error)
- func (p *Project) Remove(ctx context.Context, remove *proto.ReqProjectRemove) (err error)
- func (p *Project) ServiceCompare(ctx context.Context, compare *proto.ServiceCompare) (*proto.ServiceCompare, error)
- func (p *Project) ServiceStats(ctx context.Context, serviceName string, isSwarm bool) (map[string]*proto.ServiceStats, error)
- func (p *Project) Update(ctx context.Context, update *proto.ReqProjectUpdate) (err error)
- type Resource
- func (r *Resource) Info(ctx context.Context) (resource *proto.ResourceInfo, err error)
- func (r *Resource) Proc(pNew *proc.Proc)
- func (r *Resource) StatsAll4Containers(ctx context.Context) (*proto.ReqContainerSync, error)
- func (r *Resource) SyncContainers(ctx context.Context, sync *proto.ReqContainerSync) (resource *proto.Response, err error)
- type Service
- func (s *Service) Create(ctx context.Context, service swarm.ServiceSpec) (types.ServiceCreateResponse, error)
- func (s *Service) Inspect(ctx context.Context, serviceID string) (swarm.Service, []byte, error)
- func (s *Service) List(ctx context.Context) ([]swarm.Service, error)
- func (s *Service) Logs(ctx context.Context, serviceID string, since, until time.Time) ([]byte, error)
- func (s *Service) Process(ctx context.Context, filters filters.Args) ([]swarm.Task, error)
- func (s *Service) Remove(ctx context.Context, serviceID string) error
- func (s *Service) Resources(ctx context.Context, serviceID string) (*proto.Resources, error)
- func (s *Service) ResourcesAll(ctx context.Context) (*proto.Resources, error)
- func (s *Service) Update(ctx context.Context, serviceID string, service swarm.ServiceSpec) (types.ServiceUpdateResponse, error)
- type Stack
- func (s *Stack) Deploy(compose *model.Compose, stackName string) error
- func (s *Stack) List() (stacks []*proto.Stack, err error)
- func (s *Stack) Process(stackName string) (stackProcesses []*proto.StackProcess, err error)
- func (s *Stack) Remove(stackName ...string) error
- func (s *Stack) Services(stackName string) (services []*proto.StackService, err error)
- type Swarm
- type Volume
- func (v *Volume) Create(ctx context.Context, options volume.VolumeCreateBody) (types.Volume, error)
- func (v *Volume) Inspect(ctx context.Context, volumeID string) (types.Volume, []byte, error)
- func (v *Volume) List(ctx context.Context) (volume.VolumeListOKBody, error)
- func (v *Volume) Prune(ctx context.Context, pruneFilters filters.Args) (types.VolumesPruneReport, error)
- func (v *Volume) Remove(ctx context.Context, volumeID string, force bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { }
Container Container
func (*Container) Inspect ¶
func (c *Container) Inspect(ctx context.Context, containerID string) (types.ContainerJSON, []byte, error)
Inspect 获取容器信息
func (*Container) Logs ¶
func (c *Container) Logs(ctx context.Context, containerID string, since, until time.Time) ([]byte, error)
Logs 获取容器日志
type Image ¶
type Image struct { }
Image Image
type Network ¶
type Network struct { }
Network Network
func (*Network) Connect ¶
func (s *Network) Connect(ctx context.Context, networkID, containerID string, config *network.EndpointSettings) error
Connect Connect a container to a network
func (*Network) Create ¶
func (s *Network) Create(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)
Create Create a network
func (*Network) Disconnect ¶
Disconnect Disconnect a container from a network
func (*Network) Inspect ¶
func (s *Network) Inspect(ctx context.Context, networkID string, options types.NetworkInspectOptions) (types.NetworkResource, []byte, error)
Inspect Display detailed information on one or more networks
func (*Network) List ¶
func (s *Network) List(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)
List List networks
type Project ¶
type Project struct { }
Project Project
func (*Project) ServiceCompare ¶
func (p *Project) ServiceCompare(ctx context.Context, compare *proto.ServiceCompare) (*proto.ServiceCompare, error)
ServiceCompare 部署新的项目
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func (*Resource) StatsAll4Containers ¶
StatsAll StatsAll
func (*Resource) SyncContainers ¶
type Service ¶
type Service struct { }
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, service swarm.ServiceSpec) (types.ServiceCreateResponse, error)
List 获取服务信息
func (*Service) Logs ¶
func (s *Service) Logs(ctx context.Context, serviceID string, since, until time.Time) ([]byte, error)
Logs 获取服务日志
func (*Service) ResourcesAll ¶
ResourcesAll 所有服务资源情况
type Stack ¶
type Stack struct { }
type Volume ¶
type Volume struct { }
Volume Volume
Click to show internal directories.
Click to hide internal directories.