notifier

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 10 Imported by: 0

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 NewSlackNotifier

func NewSlackNotifier(url string, log *slog.Logger) *Slack

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL