Documentation ¶
Overview ¶
Package sink provides an interface for processing HTTP requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthStatusRegistry ¶
type HealthStatusRegistry interface { Get(context.Context) (*ttnpb.ApplicationWebhookHealth, error) Set(context.Context, func(*ttnpb.ApplicationWebhookHealth) (*ttnpb.ApplicationWebhookHealth, error)) error }
HealthStatusRegistry is a registry for webhook health status.
type Sink ¶
Sink processes HTTP requests.
func NewHTTPClientSink ¶
NewHTTPClientSink returns a new HTTP client sink.
func NewHealthCheckSink ¶
func NewHealthCheckSink( sink Sink, registry HealthStatusRegistry, unhealthyAttemptsThreshold int, unhealthyRetryInterval time.Duration, ) Sink
NewHealthCheckSink creates a Sink that records the health status of the webhooks and stops them from executing if too many fail in a specified interval of time.
func NewPooledSink ¶
func NewPooledSink(ctx context.Context, c workerpool.Component, sink Sink, workers int, queueSize int) Sink
NewPooledSink creates a Sink that queues requests and processes them in parallel workers.
Click to show internal directories.
Click to hide internal directories.