publisher

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher interface {
	// Publish an request to a "target".  Target's meaning depends on the
	// publisher: it's a URL in the case of a webhook publisher, or a queue
	// name in a queue-based publisher such as NATS.
	Publish(body string, headers map[string]string, target string)
}

type WebhookPublisher

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

A webhook publisher for a single URL. Satisifies the Publisher interface.

func MakeWebhookPublisher

func MakeWebhookPublisher(logger *zap.Logger, baseUrl string) *WebhookPublisher

func (*WebhookPublisher) Publish

func (p *WebhookPublisher) Publish(body string, headers map[string]string, target string)

Jump to

Keyboard shortcuts

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