Documentation
¶
Index ¶
- type Event
- type EventType
- type Notifier
- func (n *Notifier) NotifyContainerGaveUp(containerName, image string, maxAttempts int)
- func (n *Notifier) NotifyContainerUnhealthy(containerName, image string, attempts int)
- func (n *Notifier) NotifyContainerUpdated(containerName, image, oldDigest, newDigest string)
- func (n *Notifier) Send(event Event) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Type EventType `json:"type"`
ContainerID string `json:"container_id,omitempty"`
ContainerName string `json:"container_name,omitempty"`
Image string `json:"image,omitempty"`
Message string `json:"message"`
Timestamp time.Time `json:"timestamp"`
Extra map[string]interface{} `json:"extra,omitempty"`
}
Event represents a notification event
type EventType ¶
type EventType string
EventType represents the type of notification event
const ( EventContainerUpdated EventType = "container_updated" EventContainerRestarted EventType = "container_restarted" EventContainerUnhealthy EventType = "container_unhealthy" EventContainerGaveUp EventType = "container_gave_up" EventUpdateCycleStart EventType = "update_cycle_start" EventUpdateCycleEnd EventType = "update_cycle_end" )
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier handles sending notifications
func (*Notifier) NotifyContainerGaveUp ¶
NotifyContainerGaveUp sends a gave up notification
func (*Notifier) NotifyContainerUnhealthy ¶
NotifyContainerUnhealthy sends an unhealthy container notification
func (*Notifier) NotifyContainerUpdated ¶
NotifyContainerUpdated sends a container updated notification
Click to show internal directories.
Click to hide internal directories.