Documentation
¶
Index ¶
- Constants
- func RequireCapabilities(provider Provider, required ...RuntimeCapability) error
- type ImageIdentity
- type LogCollectionMode
- type LogSourceAdapter
- type ProjectResource
- type Provider
- type ProviderCapabilities
- type ProviderDescriptor
- type ProviderFactory
- type ProviderKind
- type ProviderRegistration
- type ProviderRegistry
- func (r *ProviderRegistry) Descriptor(kind ProviderKind) (ProviderDescriptor, error)
- func (r *ProviderRegistry) Register(registration ProviderRegistration) error
- func (r *ProviderRegistry) Resolve(ctx context.Context, kind ProviderKind) (Provider, error)
- func (r *ProviderRegistry) ResolveRuntimeProvider(ctx context.Context, kind ProviderKind) (RuntimeProvider, error)
- type PublishedPort
- type RuntimeCapability
- type RuntimeContainer
- type RuntimeProvider
- type ServiceState
Constants ¶
View Source
const RuntimeProviderContractVersion = "baseharbor.runtime/v1"
Variables ¶
This section is empty.
Functions ¶
func RequireCapabilities ¶
func RequireCapabilities(provider Provider, required ...RuntimeCapability) error
Types ¶
type ImageIdentity ¶
type LogCollectionMode ¶
type LogCollectionMode string
const ( LogCollectionSyslog LogCollectionMode = "syslog" LogCollectionJournald LogCollectionMode = "journald" )
type LogSourceAdapter ¶
type ProjectResource ¶
type Provider ¶
type Provider interface {
Kind() ProviderKind
Descriptor() ProviderDescriptor
Capabilities() ProviderCapabilities
}
type ProviderCapabilities ¶
type ProviderCapabilities struct {
WorkloadLifecycle bool
ServiceExec bool
PublishedPorts bool
ResourceOwnership bool
}
func (ProviderCapabilities) Supports ¶
func (c ProviderCapabilities) Supports(capability RuntimeCapability) bool
type ProviderDescriptor ¶
type ProviderDescriptor struct {
Kind ProviderKind
ContractVersion string
ProviderVersion string
Standards []string
WorkloadSources []string
Realization string
Capabilities ProviderCapabilities
}
type ProviderKind ¶
type ProviderKind string
const ( ProviderDocker ProviderKind = "docker" ProviderPodman ProviderKind = "podman" ProviderKubernetes ProviderKind = "kubernetes" ProviderOpenShift ProviderKind = "openshift" )
func ParseProviderKind ¶
func ParseProviderKind(value string) (ProviderKind, error)
type ProviderRegistration ¶
type ProviderRegistration struct {
Descriptor ProviderDescriptor
Factory ProviderFactory
}
type ProviderRegistry ¶
type ProviderRegistry struct {
// contains filtered or unexported fields
}
func NewProviderRegistry ¶
func NewProviderRegistry(registrations ...ProviderRegistration) (*ProviderRegistry, error)
func (*ProviderRegistry) Descriptor ¶
func (r *ProviderRegistry) Descriptor(kind ProviderKind) (ProviderDescriptor, error)
func (*ProviderRegistry) Register ¶
func (r *ProviderRegistry) Register(registration ProviderRegistration) error
func (*ProviderRegistry) Resolve ¶
func (r *ProviderRegistry) Resolve(ctx context.Context, kind ProviderKind) (Provider, error)
func (*ProviderRegistry) ResolveRuntimeProvider ¶
func (r *ProviderRegistry) ResolveRuntimeProvider(ctx context.Context, kind ProviderKind) (RuntimeProvider, error)
type PublishedPort ¶
type RuntimeCapability ¶
type RuntimeCapability string
const ( CapabilityWorkloadLifecycle RuntimeCapability = "workload-lifecycle" CapabilityServiceExec RuntimeCapability = "service-exec" CapabilityPublishedPorts RuntimeCapability = "published-ports" CapabilityResourceOwnership RuntimeCapability = "resource-ownership" )
type RuntimeContainer ¶
type RuntimeProvider ¶
type RuntimeProvider interface {
Provider
LogSourceAdapter
PreferredLocalHTTPSPort() int
Up(context.Context, string, string) error
Down(context.Context, string, string) error
Status(context.Context, string, string) (string, error)
Config(context.Context, string, string) error
UpProject(context.Context, string, string, string) error
UpProjectProgress(context.Context, string, string, string, func(string)) error
DownProject(context.Context, string, string, string) error
StopProject(context.Context, string, string, string) error
DownProjectRemoveOrphans(context.Context, string, string, string) error
DestroyProject(context.Context, string, string, string) error
DestroyProjectRemoveOrphans(context.Context, string, string, string) error
StatusProject(context.Context, string, string, string) (string, error)
LogsProject(context.Context, string, string, string, ...string) (string, error)
DiagnosticsProject(context.Context, string, string, string) string
ConfigProject(context.Context, string, string, string) error
ExecProject(context.Context, string, string, string, string, ...string) (string, error)
ExecProjectInput(context.Context, string, string, string, []byte, string, ...string) (string, error)
ConfigProjectFiles(context.Context, string, string, ...string) error
ConfigProjectFilesEnv(context.Context, string, string, map[string]string, ...string) error
ConfigJSONProjectFilesEnv(context.Context, string, string, map[string]string, ...string) (string, error)
UpProjectFiles(context.Context, string, string, ...string) error
UpProjectFilesSelected(context.Context, string, string, map[string]string, []string, ...string) error
BuildProjectFilesSelectedProgress(context.Context, string, string, map[string]string, []string, func(string), ...string) error
UpProjectFilesSelectedForceRecreateNoBuild(context.Context, string, string, map[string]string, []string, ...string) error
UpProjectFilesSelectedNoBuildProgress(context.Context, string, string, map[string]string, []string, func(string), ...string) error
UpProjectFilesSelectedProgress(context.Context, string, string, map[string]string, []string, func(string), ...string) error
DownProjectFiles(context.Context, string, string, ...string) error
DownProjectFilesEnv(context.Context, string, string, map[string]string, ...string) error
StopProjectFilesSelected(context.Context, string, string, map[string]string, []string, ...string) error
StatusProjectFiles(context.Context, string, string, ...string) (string, error)
ExecProjectFiles(context.Context, string, string, string, []string, ...string) (string, error)
ExecProjectFilesInput(context.Context, string, string, string, []string, []byte, ...string) (string, error)
ServicesProjectFiles(context.Context, string, string, ...string) ([]string, error)
ServicesProjectFilesEnv(context.Context, string, string, map[string]string, ...string) ([]string, error)
RunningServicesProjectFiles(context.Context, string, string, ...string) ([]string, error)
RunningServicesProjectFilesEnv(context.Context, string, string, map[string]string, ...string) ([]string, error)
ServiceStatesProjectFilesEnv(context.Context, string, string, map[string]string, ...string) ([]ServiceState, error)
RunProjectFilesEnv(context.Context, string, string, map[string]string, io.Reader, io.Writer, io.Writer, []string, ...string) error
PullImage(context.Context, string) error
ContainerHealthStatus(context.Context, string) (string, error)
ContainerNetworks(context.Context, string) ([]string, error)
NetworkProjectOwner(context.Context, string) (string, error)
ContainerExposedTCPPorts(context.Context, string) ([]int, error)
EnsureManagedNetwork(context.Context, string) error
ConnectManagedNetwork(context.Context, string, string, string) error
DisconnectManagedNetwork(context.Context, string, string) error
RemoveManagedNetwork(context.Context, string) error
ProjectServiceLogDriver(context.Context, string, string) (string, error)
RunningServicesProject(context.Context, string, string, string) ([]string, error)
InspectProjectResource(context.Context, string, ProjectResource) (bool, error)
InspectProjectResources(context.Context, string, []ProjectResource) ([]ProjectResource, error)
DestroyOwnedProjectResources(context.Context, string, []ProjectResource) error
ListRuntimeContainers(context.Context) ([]RuntimeContainer, error)
ProjectServiceImageIdentity(context.Context, string, string) (ImageIdentity, error)
ContainerLogConfigProjectService(context.Context, string, string) (string, string, error)
ExportOwnedVolume(context.Context, string, string) ([]byte, error)
EnsureOwnedVolume(context.Context, string, string) error
RestoreOwnedVolume(context.Context, string, string, []byte) error
}
type ServiceState ¶
type ServiceState struct {
Service string
State string
Health string
Publishers []PublishedPort
}
func (ServiceState) Ready ¶
func (s ServiceState) Ready() bool
Click to show internal directories.
Click to hide internal directories.