nats

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

README

Grav Transport: NATS

This is a streaming transport plugin for Grav that uses NATS.

Connections are managed by the Transport object.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Conn implements transport.TopicConnection and represents a subscribe/send pair for a NATS topic

func (*Conn) Close

func (c *Conn) Close()

Close closes the underlying connection

func (*Conn) Start

func (c *Conn) Start(pod *grav.Pod)

Start begins the receiving of messages

type Transport

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

Transport is a transport that connects Grav nodes via NATS

func New

func New(endpoint string) (*Transport, error)

New creates a new NATS transport

func (*Transport) ConnectTopic added in v0.5.2

func (t *Transport) ConnectTopic(topic string) (grav.BridgeConnection, error)

ConnectTopic connects to a topic if the transport is a bridge

func (*Transport) Setup

func (t *Transport) Setup(opts *grav.BridgeOptions) error

Setup sets up the transport

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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