webhook

package
v0.17.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultSender

type DefaultSender struct {
	// contains filtered or unexported fields
}

DefaultSender handles webhook delivery

func NewSender

func NewSender(logger *logging.Logger) *DefaultSender

NewSender creates a new webhook sender

func (*DefaultSender) Send

func (s *DefaultSender) Send(url string, payload io.Reader) error

Send delivers a webhook with the given payload

func (*DefaultSender) SendConditional

func (s *DefaultSender) SendConditional(url string, payload io.Reader, event Event, allowedEvents []Event, lastUpdated *time.Time) error

SendConditional sends webhook if conditions are met

type Event

type Event string

Event represents a webhook event - using string to be compatible with any type

const (
	EventStart     Event = "start"
	EventOutput    Event = "output"
	EventLogs      Event = "logs"
	EventCompleted Event = "completed"
)

type Sender

type Sender interface {
	Send(url string, payload io.Reader) error
	SendConditional(url string, payload io.Reader, event Event, allowedEvents []Event, lastUpdated *time.Time) error
}

Sender handles webhook delivery

Jump to

Keyboard shortcuts

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