webhook

package
v0.0.0-...-70b8bd4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	URL        string            `json:"url"`
	Method     string            `json:"method,omitempty"`
	Headers    map[string]string `json:"headers,omitempty"`
	Timeout    int               `json:"timeout,omitempty"`    // seconds
	MaxRetries int               `json:"maxRetries,omitempty"` // max retry attempts
	RetryDelay int               `json:"retryDelay,omitempty"` // seconds between retries
}

Configuration for Webhook sink

type Sink

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

Sink implements HTTP webhook client

func (*Sink) GetConfig

func (s *Sink) GetConfig() map[string]interface{}

GetConfig returns the sink configuration

func (*Sink) GetKind

func (s *Sink) GetKind() string

GetKind returns the sink type

func (*Sink) Start

func (s *Sink) Start() error

Start starts the webhook sink (no-op for webhook)

func (*Sink) Stop

func (s *Sink) Stop(force bool) error

Stop stops the webhook sink (no-op for webhook)

func (*Sink) Write

func (s *Sink) Write(ctx context.Context, data []byte, metadata map[string]interface{}) error

Write sends data to the webhook

Jump to

Keyboard shortcuts

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