httppublisher

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MetadataSendTo = "send_to"

MetadataSendTo is the metadata key for the destination URL.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher struct {
	*lifecycle.Lifecycle

	ServiceName string
	// contains filtered or unexported fields
}

Publisher is an implementation of a Watermill Publisher that publishes messages over HTTP.

func New

func New(serviceName string, t httpTransport) *Publisher

New creates a new HTTP Publisher.

func (*Publisher) Close

func (p *Publisher) Close() error

Close closes the publisher.

func (*Publisher) Publish

func (p *Publisher) Publish(topic string, messages ...*message.Message) error

Publish publishes the messages over HTTP to the destination specified in the messages 'send-to' metadata.

Jump to

Keyboard shortcuts

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