Documentation ¶
Overview ¶
Package trigger provides a piped component that detects a list of application should be synced (by new commit, sync command or configuration drift) and then sends request to the control-plane to create a new Deployment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Determiner ¶
type Determiner interface {
ShouldTrigger(ctx context.Context, app *model.Application, appCfg *config.GenericApplicationSpec) (bool, error)
}
func NewOnCommitDeterminer ¶
func NewOnCommitDeterminer(repo git.Repo, targetCommit string, cg LastTriggeredCommitGetter, logger *zap.Logger) Determiner
type OnChainDeterminer ¶
type OnChainDeterminer struct { }
func NewOnChainDeterminer ¶
func NewOnChainDeterminer() *OnChainDeterminer
func (*OnChainDeterminer) ShouldTrigger ¶
func (d *OnChainDeterminer) ShouldTrigger(_ context.Context, _ *model.Application, appCfg *config.GenericApplicationSpec) (bool, error)
type OnCommandDeterminer ¶
type OnCommandDeterminer struct { }
func NewOnCommandDeterminer ¶
func NewOnCommandDeterminer() *OnCommandDeterminer
func (*OnCommandDeterminer) ShouldTrigger ¶
func (d *OnCommandDeterminer) ShouldTrigger(_ context.Context, _ *model.Application, appCfg *config.GenericApplicationSpec) (bool, error)
ShouldTrigger decides whether a given application should be triggered or not.
type OnCommitDeterminer ¶
type OnCommitDeterminer struct {
// contains filtered or unexported fields
}
func (*OnCommitDeterminer) ShouldTrigger ¶
func (d *OnCommitDeterminer) ShouldTrigger(ctx context.Context, app *model.Application, appCfg *config.GenericApplicationSpec) (bool, error)
ShouldTrigger decides whether a given application should be triggered or not.
type OnOutOfSyncDeterminer ¶
type OnOutOfSyncDeterminer struct {
// contains filtered or unexported fields
}
func NewOnOutOfSyncDeterminer ¶
func NewOnOutOfSyncDeterminer(client apiClient) *OnOutOfSyncDeterminer
func (*OnOutOfSyncDeterminer) ShouldTrigger ¶
func (d *OnOutOfSyncDeterminer) ShouldTrigger(ctx context.Context, app *model.Application, appCfg *config.GenericApplicationSpec) (bool, error)
ShouldTrigger decides whether a given application should be triggered or not.
type Trigger ¶
type Trigger struct {
// contains filtered or unexported fields
}
func NewTrigger ¶
func (*Trigger) GetLastTriggeredCommitGetter ¶
func (t *Trigger) GetLastTriggeredCommitGetter() LastTriggeredCommitGetter
Click to show internal directories.
Click to hide internal directories.