rpcqueue

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const StreamName = "BROKERSRV"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.1.0

type Client struct {
	JetStreamConn jetstream.JetStream
	NatsConn      *nats.Conn
}

func NewClient added in v1.1.0

func NewClient(cfg Config, appName string) (*Client, error)

type Config added in v1.1.0

type Config struct {
	URL string
}

type Message

type Message struct {
	Request json.RawMessage `json:"request"`
	Header  http.Header     `json:"header"`
}

type Printf

type Printf func(format string, v ...interface{})

type RPCQueue

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

func New

func New(subject string, js jetstream.JetStream, srv zenrpc.Server, pf Printf) RPCQueue

New initialize new brokersrv rpc queue.

func (*RPCQueue) Run

func (q *RPCQueue) Run(ctx context.Context) error

Run subscribe to NATs Streaming subject and process events

Jump to

Keyboard shortcuts

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