outgoing

package
v0.0.0-...-5abe684 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Send(ctx context.Context, msg domain.Message) error

	// Shutdown this client.
	// This method wait until all in-flight request ends.
	Close(ctx context.Context)

	String() string
}

Client is an outgoing-webhook client.

func NewMultiplexClient

func NewMultiplexClient(clients []Client) Client

NewMultiplexClient wraps given clients as a single client

type ClientTemplate

type ClientTemplate interface {
	NewClient(tplEnv domain.TemplateStringEnv) (Client, error)
	Close()

	GetFileDescriptorPressure() int // estimated max usage of file descriptors
}

ClientTemplate is factory object to make Client

func NewClientTemplate

func NewClientTemplate(ctx context.Context, cfg *config.OutgoingWebhookConfig, telemetry *telemetry.Telemetry, sentry sentry.Sentry) (ClientTemplate, error)

NewClientTemplate returns ClientTemplate instalce

Jump to

Keyboard shortcuts

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