Documentation
¶
Index ¶
- Constants
- func ServiceRevisionID(project string, environment string, serviceName string, imageRef string, ...) string
- type Deployer
- func (d *Deployer) ActivateTakodServiceRevision(serviceName string, service *config.ServiceConfig, imageRef string) error
- func (d *Deployer) ApplyJobSchedules(services map[string]config.ServiceConfig) error
- func (d *Deployer) BuildImage(serviceName string, service *config.ServiceConfig, imageRef ...string) (string, error)
- func (d *Deployer) DeployServiceTakod(serviceName string, service *config.ServiceConfig, imageRef string) error
- func (d *Deployer) DeployServiceTakodWarmOnly(serviceName string, service *config.ServiceConfig, imageRef string) error
- func (d *Deployer) JobOwnerServer(service *config.ServiceConfig) (string, error)
- func (d *Deployer) PruneTakodServiceRevisions(services map[string]config.ServiceConfig, keepRevisions map[string]string) error
- func (d *Deployer) ReconcileTakodProxy(services map[string]config.ServiceConfig) error
- func (d *Deployer) ReconcileTakodProxyWithActiveRevisions(services map[string]config.ServiceConfig, activeRevisions map[string]string) error
- func (d *Deployer) ReleaseRunFor(serviceName string) *ReleaseRun
- func (d *Deployer) RemoveServiceTakod(serviceName string) error
- func (d *Deployer) RollbackToState(serviceName string, serviceState *state.ServiceState) error
- func (d *Deployer) SetBaseContext(ctx context.Context)
- func (d *Deployer) SetCLIVersion(version string)
- func (d *Deployer) SetEventSink(sink events.Sink)
- func (d *Deployer) SetOutput(w io.Writer)
- func (d *Deployer) SetSkipBuild(skip bool)
- func (d *Deployer) SetTargetServers(serverNames []string) error
- func (d *Deployer) SetupTakodRuntime() error
- type IgnoreParser
- type RegistryAuthError
- type ReleaseRun
Constants ¶
const DefaultReleaseTimeout = 5 * time.Minute
DefaultReleaseTimeout bounds a release command when the config sets none.
Variables ¶
This section is empty.
Functions ¶
func ServiceRevisionID ¶ added in v0.5.4
Types ¶
type Deployer ¶
type Deployer struct {
// contains filtered or unexported fields
}
Deployer handles deployment operations
func NewDeployer ¶
func NewDeployer(client *ssh.Client, cfg *config.Config, environment string, verbose bool) *Deployer
NewDeployer creates a new deployer
func NewDeployerWithPool ¶
func NewDeployerWithPool(client *ssh.Client, cfg *config.Config, environment string, sshPool *ssh.Pool, verbose bool) *Deployer
NewDeployerWithPool creates a deployer with SSH pool for multi-server support
func (*Deployer) ActivateTakodServiceRevision ¶ added in v0.5.4
func (*Deployer) ApplyJobSchedules ¶ added in v0.8.0
func (d *Deployer) ApplyJobSchedules(services map[string]config.ServiceConfig) error
ApplyJobSchedules declaratively reconciles the environment's whole job set on every target node: each job lands on its owning node's payload and is absent from every other node's, so stale schedules (moved or removed jobs) are unscheduled in the same pass.
func (*Deployer) BuildImage ¶
func (d *Deployer) BuildImage(serviceName string, service *config.ServiceConfig, imageRef ...string) (string, error)
BuildImage builds a Docker image for a service without deploying it.
func (*Deployer) DeployServiceTakod ¶ added in v0.3.0
func (d *Deployer) DeployServiceTakod(serviceName string, service *config.ServiceConfig, imageRef string) error
DeployServiceTakod reconciles one service through standalone Docker containers on the nodes chosen by takod placement.
func (*Deployer) DeployServiceTakodWarmOnly ¶ added in v0.5.4
func (*Deployer) JobOwnerServer ¶ added in v0.8.0
func (d *Deployer) JobOwnerServer(service *config.ServiceConfig) (string, error)
JobOwnerServer resolves the single node that runs a job's cron schedule: the job's first placement target, deterministic for a stable config.
func (*Deployer) PruneTakodServiceRevisions ¶ added in v0.5.4
func (*Deployer) ReconcileTakodProxy ¶ added in v0.3.0
func (d *Deployer) ReconcileTakodProxy(services map[string]config.ServiceConfig) error
func (*Deployer) ReconcileTakodProxyWithActiveRevisions ¶ added in v0.5.4
func (*Deployer) ReleaseRunFor ¶ added in v0.8.0
func (d *Deployer) ReleaseRunFor(serviceName string) *ReleaseRun
ReleaseRunFor returns the recorded release run for a service in this deploy, or nil when no release command ran.
func (*Deployer) RemoveServiceTakod ¶ added in v0.3.0
func (*Deployer) RollbackToState ¶
func (d *Deployer) RollbackToState(serviceName string, serviceState *state.ServiceState) error
RollbackToState converges a service back to a saved takod deployment state.
func (*Deployer) SetBaseContext ¶ added in v0.8.0
SetBaseContext threads the caller's context into long-running deployer streams (image builds, build-context archive uploads, service reconcile pulls) so cancelling a deploy interrupts in-flight remote work instead of waiting for it to finish.
func (*Deployer) SetCLIVersion ¶ added in v0.3.0
func (*Deployer) SetEventSink ¶ added in v0.8.0
SetEventSink routes release-command lifecycle events to an engine event stream; without one, event messages fall back to the progress output.
func (*Deployer) SetOutput ¶ added in v0.7.0
SetOutput redirects deployer progress output. Passing nil resets output to os.Stdout.
func (*Deployer) SetSkipBuild ¶ added in v0.4.47
func (*Deployer) SetTargetServers ¶ added in v0.3.0
SetTargetServers restricts takod reconciliation to a validated subset of the environment nodes. Passing an empty slice restores the full environment.
func (*Deployer) SetupTakodRuntime ¶ added in v0.3.0
SetupTakodRuntime prepares every selected environment server for the takod runtime.
type IgnoreParser ¶
type IgnoreParser struct {
// contains filtered or unexported fields
}
IgnoreParser handles parsing of .gitignore and .dockerignore files
func NewIgnoreParser ¶
func NewIgnoreParser() *IgnoreParser
NewIgnoreParser creates a new ignore parser
func (*IgnoreParser) AddDefaultExclusions ¶
func (ip *IgnoreParser) AddDefaultExclusions()
AddDefaultExclusions adds commonly excluded patterns
func (*IgnoreParser) GetExcludedPatterns ¶
func (ip *IgnoreParser) GetExcludedPatterns() []string
GetExcludedPatterns returns all exclusion patterns
func (*IgnoreParser) LoadIgnoreFile ¶
func (ip *IgnoreParser) LoadIgnoreFile(filePath string) error
LoadIgnoreFile loads patterns from a .gitignore or .dockerignore file
func (*IgnoreParser) ShouldIgnore ¶
func (ip *IgnoreParser) ShouldIgnore(relPath string) bool
ShouldIgnore checks if a file path should be ignored
type RegistryAuthError ¶ added in v0.8.0
RegistryAuthError marks an image pull/build failure caused by registry credentials (missing, wrong, or expired) rather than a missing image, so callers can prompt for credential rotation instead of retrying.
func (*RegistryAuthError) Error ¶ added in v0.8.0
func (e *RegistryAuthError) Error() string
func (*RegistryAuthError) Unwrap ¶ added in v0.8.0
func (e *RegistryAuthError) Unwrap() error