Documentation
¶
Index ¶
- Variables
- type ComposeProjectDefinition
- type ComposeProjectDefinitionInput
- type ComposeProjectItem
- type ContainerDetails
- type ContainerItem
- type ContainerServiceConfigurationState
- type ContainerServiceItem
- type CreateOperationRequest
- type Event
- type IdempotencyConflictError
- type ListOperationsRequest
- type ManagedOwner
- type ManagedOwnerResolver
- type ManagedResourceError
- type Management
- type Operation
- type OperationProgress
- type OperationState
- type Options
- type Preflight
- type PreflightRequest
- type ResourceKind
- type Service
- func (s *Service) CancelOperation(ctx context.Context, operationID string) (Operation, error)
- func (s *Service) Close() error
- func (s *Service) ComposeProject(ctx context.Context, req containerengine.ComposeProjectRequest) (containerengine.ComposeProjectDetails, Management, error)
- func (s *Service) ComposeProjectDefinition(ctx context.Context, projectID string) (ComposeProjectDefinition, error)
- func (s *Service) ComposeProjects(ctx context.Context, req containerengine.ComposeProjectListRequest) ([]ComposeProjectItem, error)
- func (s *Service) Container(ctx context.Context, req containerengine.ContainerInspectRequest) (ContainerDetails, error)
- func (s *Service) ContainerServiceConfiguration(ctx context.Context, serviceID string) (containerengine.ContainerServiceConfiguration, error)
- func (s *Service) ContainerServices(ctx context.Context) (containerengine.ContainerServicesResponse, error)
- func (s *Service) Containers(ctx context.Context, req containerengine.ContainerListRequest) ([]ContainerItem, error)
- func (s *Service) CreateComposeProjectDefinition(ctx context.Context, input ComposeProjectDefinitionInput) (ComposeProjectDefinition, error)
- func (s *Service) CreateOperation(ctx context.Context, req CreateOperationRequest) (Operation, error)
- func (s *Service) DeleteComposeProjectDefinition(ctx context.Context, projectID string) error
- func (s *Service) Events(ctx context.Context, operationID string, afterSequence int64) ([]Event, error)
- func (s *Service) FollowLogs(ctx context.Context, req containerengine.LogsTailRequest, ...) error
- func (s *Service) Image(ctx context.Context, req containerengine.ImageInspectRequest) (containerengine.ImageRecord, error)
- func (s *Service) ImageBuildHistory(ctx context.Context, req containerengine.ImageBuildHistoryRequest) ([]containerengine.ImageBuildHistoryEntry, error)
- func (s *Service) Images(ctx context.Context, req containerengine.ImageListRequest) ([]containerengine.ImageRecord, error)
- func (s *Service) ListVolumeFiles(ctx context.Context, req containerengine.VolumeFileRequest) (containerengine.ResourceFileListing, error)
- func (s *Service) Operation(ctx context.Context, operationID string) (Operation, error)
- func (s *Service) Operations(ctx context.Context, limit int) ([]Operation, error)
- func (s *Service) Pod(ctx context.Context, req containerengine.PodRequest) (containerengine.PodRecord, error)
- func (s *Service) Pods(ctx context.Context, req containerengine.PodListRequest) ([]containerengine.PodRecord, error)
- func (s *Service) Preflight(ctx context.Context, req PreflightRequest) (Preflight, error)
- func (s *Service) PrepareContainerExec(ctx context.Context, req containerengine.ContainerExecRequest) (containerengine.ProgramSpec, error)
- func (s *Service) RawContainerInspect(ctx context.Context, req containerengine.ContainerInspectRequest) (json.RawMessage, error)
- func (s *Service) ReadVolumeFile(ctx context.Context, req containerengine.VolumeFileRequest) (containerengine.ResourceFileContent, error)
- func (s *Service) Runtimes(ctx context.Context) (containerengine.ActiveRuntimeResponse, error)
- func (s *Service) Stats(ctx context.Context, req containerengine.ContainerStatsWatchRequest) (containerengine.ContainerStats, error)
- func (s *Service) StatsCollection(ctx context.Context, req containerengine.ContainerStatsCollectionRequest) (containerengine.ContainerStatsCollection, error)
- func (s *Service) Subscribe(ctx context.Context, operationID string, afterSequence int64) ([]Event, <-chan Event, error)
- func (s *Service) TailLogs(ctx context.Context, req containerengine.LogsTailRequest) (containerengine.LogsTailResponse, error)
- func (s *Service) UpdateComposeProjectDefinition(ctx context.Context, projectID string, input ComposeProjectDefinitionInput) (ComposeProjectDefinition, error)
- func (s *Service) Volume(ctx context.Context, req containerengine.VolumeInspectRequest) (VolumeItem, error)
- func (s *Service) VolumeDiskUsage(ctx context.Context, req containerengine.VolumeListRequest) (containerengine.VolumeDiskUsageResponse, error)
- func (s *Service) Volumes(ctx context.Context, req containerengine.VolumeListRequest) ([]VolumeItem, error)
- type VolumeItem
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidRequest = errors.New("container resource request is invalid") ErrPreflightStale = errors.New("container resource preflight is stale") ErrIdempotencyConflict = errors.New("container resource idempotency conflict") ErrOperationNotFound = errors.New("container resource operation was not found") ErrOperationTerminal = errors.New("container resource operation is already terminal") ErrManagedByWebService = errors.New("container resource is managed by Web Services") )
View Source
var ErrComposeProjectDefinitionNotFound = errors.New("saved Compose project was not found")
Functions ¶
This section is empty.
Types ¶
type ComposeProjectDefinition ¶
type ComposeProjectDefinition struct {
ProjectID string `json:"project_id"`
Engine containerengine.Engine `json:"engine"`
EndpointID containerengine.EndpointID `json:"endpoint_id"`
Name string `json:"name"`
ConfigPaths []string `json:"config_paths"`
EnvFilePath string `json:"env_file_path,omitempty"`
Profiles []string `json:"profiles,omitempty"`
CreatedAtUnixMs int64 `json:"created_at_unix_ms"`
UpdatedAtUnixMs int64 `json:"updated_at_unix_ms"`
}
type ComposeProjectDefinitionInput ¶
type ComposeProjectDefinitionInput struct {
Engine containerengine.Engine `json:"engine"`
EndpointID containerengine.EndpointID `json:"endpoint_id"`
Name string `json:"name"`
ConfigPaths []string `json:"config_paths"`
EnvFilePath string `json:"env_file_path,omitempty"`
Profiles []string `json:"profiles,omitempty"`
}
type ComposeProjectItem ¶
type ComposeProjectItem struct {
containerengine.ComposeProject
Management Management `json:"management"`
Saved bool `json:"saved"`
Source string `json:"source,omitempty"`
}
type ContainerDetails ¶
type ContainerDetails struct {
containerengine.ContainerInspect
Management Management `json:"management"`
}
type ContainerItem ¶
type ContainerItem struct {
containerengine.ContainerSummary
Management Management `json:"management"`
}
type ContainerServiceConfigurationState ¶
type ContainerServiceConfigurationState struct {
ServiceID string
SourceID containerengine.ContainerServiceConfigurationSourceID
ConfigurationRevision string
RestartRequired bool
ServiceGeneration string
UpdatedAtUnixMs int64
}
type ContainerServiceItem ¶
type ContainerServiceItem struct {
containerengine.ContainerService
}
type CreateOperationRequest ¶
type CreateOperationRequest struct {
RequestID string `json:"request_id"`
Method containerengine.Method `json:"method"`
Request json.RawMessage `json:"request"`
RequestHash string `json:"request_hash"`
PlanHash string `json:"plan_hash"`
}
type Event ¶
type Event struct {
Sequence int64 `json:"sequence"`
OperationID string `json:"operation_id"`
Type string `json:"type"`
State OperationState `json:"state"`
Payload json.RawMessage `json:"payload,omitempty"`
CreatedAtUnixMs int64 `json:"created_at_unix_ms"`
}
type IdempotencyConflictError ¶
type IdempotencyConflictError struct {
RequestID string
}
func (*IdempotencyConflictError) Error ¶
func (e *IdempotencyConflictError) Error() string
func (*IdempotencyConflictError) Is ¶
func (e *IdempotencyConflictError) Is(target error) bool
type ListOperationsRequest ¶
type ManagedOwner ¶
type ManagedOwnerResolver ¶
type ManagedOwnerResolver func(context.Context, containerengine.Engine, containerengine.EndpointID, ResourceKind, string) (*ManagedOwner, error)
type ManagedResourceError ¶
type ManagedResourceError struct {
Owner ManagedOwner
}
func (*ManagedResourceError) Error ¶
func (e *ManagedResourceError) Error() string
func (*ManagedResourceError) Is ¶
func (e *ManagedResourceError) Is(target error) bool
type Management ¶
type Management struct {
Managed bool `json:"managed"`
Owner *ManagedOwner `json:"owner,omitempty"`
}
type Operation ¶
type Operation struct {
OperationID string `json:"operation_id"`
RequestID string `json:"request_id"`
RequestHash string `json:"request_hash"`
PlanHash string `json:"plan_hash"`
Method containerengine.Method `json:"method"`
Engine containerengine.Engine `json:"engine"`
EndpointID containerengine.EndpointID `json:"endpoint_id,omitempty"`
ResourceKind ResourceKind `json:"resource_kind"`
ResourceIdentity string `json:"resource_identity"`
State OperationState `json:"state"`
CancelRequested bool `json:"cancel_requested"`
ErrorCode string `json:"error_code,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
Reconciliation json.RawMessage `json:"reconciliation,omitempty"`
CreatedAtUnixMs int64 `json:"created_at_unix_ms"`
StartedAtUnixMs int64 `json:"started_at_unix_ms,omitempty"`
FinishedAtUnixMs int64 `json:"finished_at_unix_ms,omitempty"`
UpdatedAtUnixMs int64 `json:"updated_at_unix_ms"`
}
type OperationProgress ¶
type OperationState ¶
type OperationState string
const ( OperationQueued OperationState = "queued" OperationRunning OperationState = "running" OperationSucceeded OperationState = "succeeded" OperationFailed OperationState = "failed" OperationCanceling OperationState = "canceling" OperationCanceled OperationState = "canceled" OperationInterrupted OperationState = "interrupted" )
func (OperationState) Terminal ¶
func (s OperationState) Terminal() bool
type Options ¶
type Options struct {
DatabasePath string
Engine *containerengine.Adapter
ResolveManagedOwner ManagedOwnerResolver
}
type Preflight ¶
type Preflight struct {
Method containerengine.Method `json:"method"`
Engine containerengine.Engine `json:"engine"`
EndpointID containerengine.EndpointID `json:"endpoint_id,omitempty"`
ResourceKind ResourceKind `json:"resource_kind"`
ResourceIdentity string `json:"resource_identity"`
RequestHash string `json:"request_hash"`
PlanHash string `json:"plan_hash"`
Plan containerengine.ResourcePlan `json:"plan"`
Management Management `json:"management"`
}
type PreflightRequest ¶
type PreflightRequest struct {
Method containerengine.Method `json:"method"`
Request json.RawMessage `json:"request"`
}
type ResourceKind ¶
type ResourceKind string
const ( ResourceContainer ResourceKind = "container" ResourceImage ResourceKind = "image" ResourceVolume ResourceKind = "volume" ResourceComposeProject ResourceKind = "compose_project" ResourcePod ResourceKind = "pod" ResourceContainerService ResourceKind = "container_service" )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CancelOperation ¶
func (*Service) ComposeProject ¶
func (s *Service) ComposeProject(ctx context.Context, req containerengine.ComposeProjectRequest) (containerengine.ComposeProjectDetails, Management, error)
func (*Service) ComposeProjectDefinition ¶
func (*Service) ComposeProjects ¶
func (s *Service) ComposeProjects(ctx context.Context, req containerengine.ComposeProjectListRequest) ([]ComposeProjectItem, error)
func (*Service) Container ¶
func (s *Service) Container(ctx context.Context, req containerengine.ContainerInspectRequest) (ContainerDetails, error)
func (*Service) ContainerServiceConfiguration ¶
func (s *Service) ContainerServiceConfiguration(ctx context.Context, serviceID string) (containerengine.ContainerServiceConfiguration, error)
func (*Service) ContainerServices ¶
func (s *Service) ContainerServices(ctx context.Context) (containerengine.ContainerServicesResponse, error)
func (*Service) Containers ¶
func (s *Service) Containers(ctx context.Context, req containerengine.ContainerListRequest) ([]ContainerItem, error)
func (*Service) CreateComposeProjectDefinition ¶
func (s *Service) CreateComposeProjectDefinition(ctx context.Context, input ComposeProjectDefinitionInput) (ComposeProjectDefinition, error)
func (*Service) CreateOperation ¶
func (*Service) DeleteComposeProjectDefinition ¶
func (*Service) FollowLogs ¶
func (s *Service) FollowLogs(ctx context.Context, req containerengine.LogsTailRequest, sink containerengine.LogLineSink) error
func (*Service) Image ¶
func (s *Service) Image(ctx context.Context, req containerengine.ImageInspectRequest) (containerengine.ImageRecord, error)
func (*Service) ImageBuildHistory ¶
func (s *Service) ImageBuildHistory(ctx context.Context, req containerengine.ImageBuildHistoryRequest) ([]containerengine.ImageBuildHistoryEntry, error)
func (*Service) Images ¶
func (s *Service) Images(ctx context.Context, req containerengine.ImageListRequest) ([]containerengine.ImageRecord, error)
func (*Service) ListVolumeFiles ¶
func (s *Service) ListVolumeFiles(ctx context.Context, req containerengine.VolumeFileRequest) (containerengine.ResourceFileListing, error)
func (*Service) Operations ¶
func (*Service) Pod ¶
func (s *Service) Pod(ctx context.Context, req containerengine.PodRequest) (containerengine.PodRecord, error)
func (*Service) Pods ¶
func (s *Service) Pods(ctx context.Context, req containerengine.PodListRequest) ([]containerengine.PodRecord, error)
func (*Service) PrepareContainerExec ¶
func (s *Service) PrepareContainerExec(ctx context.Context, req containerengine.ContainerExecRequest) (containerengine.ProgramSpec, error)
func (*Service) RawContainerInspect ¶
func (s *Service) RawContainerInspect(ctx context.Context, req containerengine.ContainerInspectRequest) (json.RawMessage, error)
func (*Service) ReadVolumeFile ¶
func (s *Service) ReadVolumeFile(ctx context.Context, req containerengine.VolumeFileRequest) (containerengine.ResourceFileContent, error)
func (*Service) Runtimes ¶
func (s *Service) Runtimes(ctx context.Context) (containerengine.ActiveRuntimeResponse, error)
func (*Service) Stats ¶
func (s *Service) Stats(ctx context.Context, req containerengine.ContainerStatsWatchRequest) (containerengine.ContainerStats, error)
func (*Service) StatsCollection ¶
func (s *Service) StatsCollection(ctx context.Context, req containerengine.ContainerStatsCollectionRequest) (containerengine.ContainerStatsCollection, error)
func (*Service) TailLogs ¶
func (s *Service) TailLogs(ctx context.Context, req containerengine.LogsTailRequest) (containerengine.LogsTailResponse, error)
func (*Service) UpdateComposeProjectDefinition ¶
func (s *Service) UpdateComposeProjectDefinition(ctx context.Context, projectID string, input ComposeProjectDefinitionInput) (ComposeProjectDefinition, error)
func (*Service) Volume ¶
func (s *Service) Volume(ctx context.Context, req containerengine.VolumeInspectRequest) (VolumeItem, error)
func (*Service) VolumeDiskUsage ¶
func (s *Service) VolumeDiskUsage(ctx context.Context, req containerengine.VolumeListRequest) (containerengine.VolumeDiskUsageResponse, error)
func (*Service) Volumes ¶
func (s *Service) Volumes(ctx context.Context, req containerengine.VolumeListRequest) ([]VolumeItem, error)
type VolumeItem ¶
type VolumeItem struct {
containerengine.VolumeRecord
Management Management `json:"management"`
ReferencesComplete bool `json:"references_complete"`
}
Click to show internal directories.
Click to hide internal directories.