transport

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	Publish(channel string, data []byte) error
}

func Connect

func Connect(ctx context.Context, logger log.Logger, uri *url.URL) (Connection, error)

type NatsConnection

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

func (*NatsConnection) Publish

func (c *NatsConnection) Publish(channel string, data []byte) error

type NatsSubscription

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

func (*NatsSubscription) Receive

func (ns *NatsSubscription) Receive() chan []byte

func (*NatsSubscription) Unsubscribe

func (ns *NatsSubscription) Unsubscribe()

type Subscription

type Subscription interface {
	Unsubscribe()
	Receive() chan []byte
}

func Listen

func Listen(ctx context.Context, logger log.Logger, uri *url.URL, clientID string) (Subscription, error)

Jump to

Keyboard shortcuts

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