requester

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPRequester added in v0.0.3

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

HTTPRequester performs an HTTP request to the requester service at the configured host.

func NewHTTPRequester added in v0.0.3

func NewHTTPRequester(deliveryKind *resource.DeliveryKind) *HTTPRequester

func (*HTTPRequester) Request added in v0.0.3

func (r *HTTPRequester) Request(input map[string]interface{}) (map[string]interface{}, error)

type LogRequester added in v0.0.3

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

LogRequester logs the input and output values. It is typically used during development when the actual message delivery is not important.

func NewLogRequester added in v0.0.3

func NewLogRequester(deliveryKind *resource.DeliveryKind) *LogRequester

func (*LogRequester) Request added in v0.0.3

func (r *LogRequester) Request(input map[string]interface{}) (map[string]interface{}, error)

type NoopRequester added in v0.0.3

type NoopRequester struct{}

NoopRequester does nothing. It is typically used when a message should not be delivered, eg. when testing or debugging.

func NewNoopRequester added in v0.0.3

func NewNoopRequester() *NoopRequester

func (*NoopRequester) Request added in v0.0.3

func (r *NoopRequester) Request(_ map[string]interface{}) (map[string]interface{}, error)

type Requester

type Requester interface {
	Request(map[string]interface{}) (map[string]interface{}, error)
}

Requester defines a request to deliver a message.

func New

func New(deliveryKind *resource.DeliveryKind) Requester

New creates a new requester for the specified delivery kind. Most requesters are callable by HTTP, but there are some built-in requesters.

Jump to

Keyboard shortcuts

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