Documentation
¶
Index ¶
- type Config
- type Manager
- func (m *Manager) Deploy(ctx context.Context, req workload.DeployRequest) (*workload.DeployResult, error)
- func (m *Manager) Exec(ctx context.Context, id string, cmd []string) (*workload.ExecResult, error)
- func (m *Manager) HealthCheck(ctx context.Context) error
- func (m *Manager) List(ctx context.Context, filter workload.ListFilter) ([]workload.WorkloadInfo, error)
- func (m *Manager) Logs(ctx context.Context, id string, opts workload.LogOptions) ([]string, error)
- func (m *Manager) Remove(ctx context.Context, id string) error
- func (m *Manager) Restart(ctx context.Context, id string) error
- func (m *Manager) Stats(ctx context.Context, id string) (*workload.WorkloadStats, error)
- func (m *Manager) Status(ctx context.Context, id string) (*workload.WorkloadStatus, error)
- func (m *Manager) Stop(ctx context.Context, id string) error
- func (m *Manager) StreamLogs(ctx context.Context, id string, opts workload.LogOptions) (io.ReadCloser, error)
- func (m *Manager) Wait(ctx context.Context, id string) (*workload.WaitResult, error)
- func (m *Manager) WatchEvents(ctx context.Context, filter workload.ListFilter) (<-chan workload.WorkloadEvent, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Host string `mapstructure:"host" json:"host"`
APIVersion string `mapstructure:"api_version" json:"api_version"`
TLS *security.TLSConfig `mapstructure:"tls" json:"tls"`
Network string `mapstructure:"network" json:"network"`
Registry string `mapstructure:"registry" json:"registry"`
Platform string `mapstructure:"platform" json:"platform"`
}
Config holds Docker-specific workload configuration.
func (*Config) ApplyDefaults ¶
func (c *Config) ApplyDefaults()
ApplyDefaults fills in zero-valued fields.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager implements workload.Manager using the Docker Engine SDK.
func NewManager ¶
NewManager creates a new Docker workload manager.
func (*Manager) Deploy ¶
func (m *Manager) Deploy(ctx context.Context, req workload.DeployRequest) (*workload.DeployResult, error)
Deploy creates and starts a Docker container.
func (*Manager) HealthCheck ¶
HealthCheck verifies Docker is available.
func (*Manager) List ¶
func (m *Manager) List(ctx context.Context, filter workload.ListFilter) ([]workload.WorkloadInfo, error)
List returns containers matching the filter.
func (*Manager) StreamLogs ¶
func (m *Manager) StreamLogs(ctx context.Context, id string, opts workload.LogOptions) (io.ReadCloser, error)
StreamLogs implements LogStreamer for real-time log streaming.
func (*Manager) WatchEvents ¶
func (m *Manager) WatchEvents(ctx context.Context, filter workload.ListFilter) (<-chan workload.WorkloadEvent, error)
WatchEvents watches Docker container lifecycle events and emits WorkloadEvents.
Click to show internal directories.
Click to hide internal directories.