comm

package
v0.0.0-...-211c12f Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerContext

type HandlerContext struct {
	JetStream nats.JetStreamContext
}

type NatsClient

type NatsClient struct {
	JetStream nats.JetStreamContext
	// contains filtered or unexported fields
}

func Dial

func Dial(opts *NatsClientOpts) (*NatsClient, error)

func (*NatsClient) Broadcast

func (c *NatsClient) Broadcast(channel string) error

func (*NatsClient) Call

func (c *NatsClient) Call(channel string, device string, data []byte) error

func (*NatsClient) Close

func (c *NatsClient) Close() error

func (*NatsClient) HandleBroadcast

func (c *NatsClient) HandleBroadcast(channel string, handler nats.MsgHandler) error

func (*NatsClient) IsConnected

func (c *NatsClient) IsConnected() bool

func (*NatsClient) Request

func (c *NatsClient) Request(channel string, device string, data []byte) ([]byte, error)

type NatsClientOpts

type NatsClientOpts struct {
	Root             string
	NatsUrl          string
	NatsOptions      []nats.Option
	JetStreamOptions []nats.JSOpt
}

Jump to

Keyboard shortcuts

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