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) }
Publisher interface wraps the Publish method that publishes an request with given "body" and "headers" to given "target"
type WebhookPublisher ¶
type WebhookPublisher struct {
// contains filtered or unexported fields
}
WebhookPublisher for a single URL. Satisfies the Publisher interface.
func MakeWebhookPublisher ¶
func MakeWebhookPublisher(logger *zap.Logger, baseURL string) *WebhookPublisher
MakeWebhookPublisher creates a WebhookPublisher object for the given baseURL
Click to show internal directories.
Click to hide internal directories.