fabricnats

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MsgConnection

type MsgConnection struct{}

func (*MsgConnection) RecvAndReply

func (m *MsgConnection) RecvAndReply(handler fabric.Handler)

func (*MsgConnection) SendAndRecv

func (m *MsgConnection) SendAndRecv(msg any, receiver fabric.Receiver) error

type Nats

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

func New

func New(serviceName string) (*Nats, error)

New creates a new NATS fabric

func (*Nats) Messenger

func (n *Nats) Messenger(service string) (fabric.MsgConnection, error)

Messenger returns a connection for message sending/receiving

func (*Nats) Replayer

func (n *Nats) Replayer(subject string, beginning bool) (fabric.ReplayConnection, error)

Replayer returns a connection for Replayer publish/replay

type ReplayConnection

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

ReplayConnection is a connection for pub/sub/replay

func (*ReplayConnection) Publish

func (b *ReplayConnection) Publish(msg any) error

Publish publishes a message to a broadcast channel

func (*ReplayConnection) Replay

func (b *ReplayConnection) Replay(gen fabric.Generator, recv fabric.Receiver) (chan bool, error)

Jump to

Keyboard shortcuts

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