webhook

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	TaskID         string                 `json:"task_id"`
	Status         string                 `json:"status"`
	Result         string                 `json:"result,omitempty"`
	Error          string                 `json:"error,omitempty"`
	ChangesSummary *gitpkg.ChangesSummary `json:"changes_summary,omitempty"`
	Usage          *session.UsageInfo     `json:"usage,omitempty"`
	TraceID        string                 `json:"trace_id,omitempty"`
	FinishedAt     time.Time              `json:"finished_at"`
}

Payload is the webhook request body.

type Sender

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

Sender delivers webhook callbacks with HMAC-SHA256 signatures.

func NewSender

func NewSender(secret string, maxRetries int, baseDelay time.Duration) *Sender

NewSender creates a webhook sender.

func (*Sender) Send

func (s *Sender) Send(ctx context.Context, callbackURL string, payload Payload) error

Send delivers a webhook to the callback URL with retries and exponential backoff.

Jump to

Keyboard shortcuts

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