Documentation
¶
Index ¶
- func RedactURL(raw string) string
- func WithSource(ctx context.Context, s Source) context.Context
- type ComposeProject
- type ComposeProjectLoader
- type ComposeUpRunner
- type ContainerInspector
- type ContainerLister
- type ImageUpdater
- type NoopNotifier
- type Notifier
- type Option
- type ProjectLoader
- type ProjectUpdateError
- type Self
- type ServiceLister
- type ServiceUpdateError
- type ServiceUpdater
- type Source
- type SwarmUpdater
- type UpdateErrors
- type Updater
- type WebhookNotifier
- func (n *WebhookNotifier) NotifyPending(ctx context.Context, image string, target string, dir string)
- func (n *WebhookNotifier) NotifyResult(ctx context.Context, image string, target string, dir string, err error)
- func (n *WebhookNotifier) NotifySkipped(ctx context.Context, image string, target string, dir string, reason string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ComposeProject ¶
type ComposeProjectLoader ¶
type ComposeProjectLoader struct{}
func (ComposeProjectLoader) LoadProject ¶
func (l ComposeProjectLoader) LoadProject(ctx context.Context, workingDir string, configFiles []string) (*composetypes.Project, error)
type ComposeUpRunner ¶
type ContainerInspector ¶ added in v0.15.0
type ContainerInspector interface {
ContainerInspect(ctx context.Context, containerID string, options client.ContainerInspectOptions) (client.ContainerInspectResult, error)
}
type ContainerLister ¶
type ContainerLister interface {
ContainerList(ctx context.Context, opts client.ContainerListOptions) (client.ContainerListResult, error)
}
type ImageUpdater ¶
func New ¶
func New(ctx context.Context, dockerClient *client.Client, composeService ComposeUpRunner, notifier Notifier, includeOnly bool, opts ...Option) (ImageUpdater, error)
New returns a swarm updater if the docker daemon is a swarm manager, or a compose updater otherwise.
func NewFromEnv ¶
func NewFromEnv(ctx context.Context, notifier Notifier, includeOnly bool, opts ...Option) (ImageUpdater, error)
NewFromEnv connects to docker using the standard environment variables and docker config, and returns a compose or swarm updater depending on how the daemon is configured.
type NoopNotifier ¶
type NoopNotifier struct{}
func (NoopNotifier) NotifyPending ¶
func (NoopNotifier) NotifyResult ¶
func (NoopNotifier) NotifySkipped ¶ added in v0.15.0
type Option ¶ added in v0.14.0
type Option func(*options)
Option configures an updater.
func WithDirLocking ¶ added in v0.14.0
WithDirLocking sets whether a compose project's directory is flocked while it is updated. Defaults to false.
type ProjectLoader ¶
type ProjectUpdateError ¶
func (*ProjectUpdateError) Error ¶
func (e *ProjectUpdateError) Error() string
func (*ProjectUpdateError) Unwrap ¶
func (e *ProjectUpdateError) Unwrap() error
type Self ¶ added in v0.15.0
func DetectSelf ¶ added in v0.15.0
func DetectSelf(ctx context.Context, inspector ContainerInspector) (Self, bool)
type ServiceLister ¶
type ServiceLister interface {
ServiceList(ctx context.Context, options client.ServiceListOptions) (client.ServiceListResult, error)
}
type ServiceUpdateError ¶
func (*ServiceUpdateError) Error ¶
func (e *ServiceUpdateError) Error() string
func (*ServiceUpdateError) Unwrap ¶
func (e *ServiceUpdateError) Unwrap() error
type ServiceUpdater ¶
type ServiceUpdater interface {
ServiceUpdate(ctx context.Context, serviceID string, options client.ServiceUpdateOptions) (client.ServiceUpdateResult, error)
}
type SwarmUpdater ¶
type SwarmUpdater struct {
// contains filtered or unexported fields
}
func NewSwarmUpdater ¶
func NewSwarmUpdater(serviceLister ServiceLister, serviceUpdater ServiceUpdater, notifier Notifier, includeOnly bool) *SwarmUpdater
func (*SwarmUpdater) HandleUpdate ¶
type UpdateErrors ¶
type UpdateErrors struct {
Errors []error
}
func (*UpdateErrors) Error ¶
func (e *UpdateErrors) Error() string
func (*UpdateErrors) Unwrap ¶
func (e *UpdateErrors) Unwrap() []error
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
func NewUpdater ¶
func NewUpdater(composeService ComposeUpRunner, dockerClient ContainerLister, projectLoader ProjectLoader, notifier Notifier, includeOnly bool, opts ...Option) *Updater
type WebhookNotifier ¶
type WebhookNotifier struct {
// contains filtered or unexported fields
}
func NewWebhookNotifier ¶
func NewWebhookNotifier(url, secret string) *WebhookNotifier