Documentation
¶
Overview ¶
Package notifier sends deployment lifecycle notifications to external systems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Noop ¶
type Noop struct{}
func (Noop) NotifyOnDeploymentFailed ¶
func (Noop) NotifyOnDeploymentFailed(meta git_provider.DeploymentMetadata, err error)
func (Noop) NotifyOnDeploymentSuccess ¶
func (Noop) NotifyOnDeploymentSuccess(dep state.DeploymentState)
func (Noop) NotifyOnNewDeploymentStarted ¶
func (Noop) NotifyOnNewDeploymentStarted(meta git_provider.DeploymentMetadata)
type Notifier ¶
type Notifier interface {
NotifyOnNewDeploymentStarted(meta git_provider.DeploymentMetadata)
NotifyOnDeploymentFailed(meta git_provider.DeploymentMetadata, err error)
NotifyOnDeploymentSuccess(dep state.DeploymentState)
}
Notifier sends deployment state notifications or alert to external destinations like Slack.
Since alerts are not core business logic, error encountered should be logged
type Slack ¶
type Slack struct {
// contains filtered or unexported fields
}
func (*Slack) NotifyOnDeploymentFailed ¶
func (sl *Slack) NotifyOnDeploymentFailed(meta git_provider.DeploymentMetadata, err error)
func (*Slack) NotifyOnDeploymentSuccess ¶
func (sl *Slack) NotifyOnDeploymentSuccess(dep state.DeploymentState)
func (*Slack) NotifyOnNewDeploymentStarted ¶
func (sl *Slack) NotifyOnNewDeploymentStarted(meta git_provider.DeploymentMetadata)
Click to show internal directories.
Click to hide internal directories.