pubsub

package
v0.0.0-...-c325cbb Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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