Documentation

Overview

Package pubsub implements the API for streaming pubsub messages between api servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API provides access to the pubsub API.

func NewAPI

func NewAPI(connector base.StreamConnector) *API

NewAPI creates a new client-side pubsub API.

func (*API) OpenMessageWriter

func (api *API) OpenMessageWriter() (MessageWriter, error)

OpenMessageWriter returns a new message writer interface value which must be closed when finished with.

type MessageWriter

type MessageWriter interface {
	// ForwardMessage forwards the given message to the server.
	ForwardMessage(*params.PubSubMessage) error
	Close() error
}

MessageWriter is the interface that allows sending pub/sub messges to the server.

Source Files