event

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Heartbeat string
	StatusVal string
	Body      string
	SinceVal  time.Duration
	Time      time.Time
	Receivers []string
}

Event represents a notification with delivery configuration.

func NewEvent

func NewEvent(
	heartbeatID, status, body string,
	since time.Duration,
	timestamp time.Time,
	receivers []string,
) *Event

NewEvent constructs an Event with delivery configuration.

func (*Event) HeartbeatID

func (e *Event) HeartbeatID() string

HeartbeatID returns the heartbeat id.

func (*Event) Payload

func (e *Event) Payload() string

Payload returns the raw payload.

func (*Event) ReceiverNames

func (e *Event) ReceiverNames() []string

ReceiverNames returns the receiver names for the notification.

func (*Event) Since

func (e *Event) Since() time.Duration

Since returns the elapsed time since last heartbeat.

func (*Event) Status

func (e *Event) Status() string

Status returns the status identifier.

func (*Event) Timestamp

func (e *Event) Timestamp() time.Time

Timestamp returns the event timestamp.

Jump to

Keyboard shortcuts

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