Documentation
¶
Index ¶
- Variables
- type ComponentProvider
- type Deployer
- type DeployerMux
- func (m DeployerMux) Cleanup(ctx context.Context, w io.Writer) error
- func (m DeployerMux) Dependencies() ([]string, error)
- func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []graph.Artifact) ([]string, error)
- func (m DeployerMux) GetAccessor() access.Accessor
- func (m DeployerMux) GetDebugger() debug.Debugger
- func (m DeployerMux) GetLogger() log.Logger
- func (m DeployerMux) GetStatusMonitor() status.Monitor
- func (m DeployerMux) GetSyncer() sync.Syncer
- func (m DeployerMux) Render(ctx context.Context, w io.Writer, as []graph.Artifact, offline bool, ...) error
- func (m DeployerMux) TrackBuildArtifacts(_ []graph.Artifact)
Constants ¶
This section is empty.
Variables ¶
View Source
var NoopComponentProvider = ComponentProvider{ Accessor: &access.NoopProvider{}, Debugger: &debug.NoopProvider{}, Logger: &log.NoopProvider{}, Monitor: &status.NoopProvider{}, Syncer: &sync.NoopProvider{}, }
NoopComponentProvider is for tests
Functions ¶
This section is empty.
Types ¶
type ComponentProvider ¶ added in v1.27.0
type ComponentProvider struct {
Accessor access.Provider
Debugger debug.Provider
Logger log.Provider
Monitor status.Provider
Syncer sync.Provider
}
ComponentProvider serves as a clean way to send three providers as params to the Deployer constructors
type Deployer ¶
type Deployer interface {
// Deploy should ensure that the build results are deployed to the Kubernetes
// cluster. Returns the list of impacted namespaces.
Deploy(context.Context, io.Writer, []graph.Artifact) ([]string, error)
// Dependencies returns a list of files that the deployer depends on.
// In dev mode, a redeploy will be triggered
Dependencies() ([]string, error)
// Cleanup deletes what was deployed by calling Deploy.
Cleanup(context.Context, io.Writer) error
// Render generates the Kubernetes manifests replacing the build results and
// writes them to the given file path
Render(context.Context, io.Writer, []graph.Artifact, bool, string) error
// GetDebugger returns a Deployer's implementation of a Debugger
GetDebugger() debug.Debugger
// GetLogger returns a Deployer's implementation of a Logger
GetLogger() log.Logger
// GetAccessor returns a Deployer's implementation of an Accessor
GetAccessor() access.Accessor
// GetSyncer returns a Deployer's implementation of a Syncer
GetSyncer() sync.Syncer
// TrackBuildArtifacts registers build artifacts to be tracked by a Deployer
TrackBuildArtifacts([]graph.Artifact)
// GetStatusMonitor returns a Deployer's implementation of a StatusMonitor
GetStatusMonitor() status.Monitor
}
Deployer is the Deploy API of skaffold and responsible for deploying the build results to a Kubernetes cluster
type DeployerMux ¶ added in v1.2.0
type DeployerMux []Deployer
DeployerMux forwards all method calls to the deployers it contains. When encountering an error, it aborts and returns the error. Otherwise, it collects the results and returns it in bulk.
func (DeployerMux) Dependencies ¶ added in v1.2.0
func (m DeployerMux) Dependencies() ([]string, error)
func (DeployerMux) GetAccessor ¶ added in v1.27.0
func (m DeployerMux) GetAccessor() access.Accessor
func (DeployerMux) GetDebugger ¶ added in v1.27.0
func (m DeployerMux) GetDebugger() debug.Debugger
func (DeployerMux) GetLogger ¶ added in v1.27.0
func (m DeployerMux) GetLogger() log.Logger
func (DeployerMux) GetStatusMonitor ¶ added in v1.27.0
func (m DeployerMux) GetStatusMonitor() status.Monitor
func (DeployerMux) GetSyncer ¶ added in v1.27.0
func (m DeployerMux) GetSyncer() sync.Syncer
func (DeployerMux) TrackBuildArtifacts ¶ added in v1.27.0
func (m DeployerMux) TrackBuildArtifacts(_ []graph.Artifact)
TrackBuildArtifacts should *only* be called on individual deployers. This is a noop.
Click to show internal directories.
Click to hide internal directories.