nats

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

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

func CreateBroker

func CreateBroker(ctx context.Context, domain string, opts *redis.UniversalOptions) *Broker

func (*Broker) ReadRequest

func (s *Broker) ReadRequest(ctx context.Context) (json.RawMessage, func(json.RawMessage) error, error)

func (*Broker) Subscribe

func (s *Broker) Subscribe(ctx context.Context, clientId string) (broker.Subscription, error)

func (*Broker) WriteRequest

func (s *Broker) WriteRequest(ctx context.Context, clientId string, msg json.RawMessage) error

type RedisRequest

type RedisRequest struct {
	ReplyChannel string          `json:"r"`
	Message      json.RawMessage `json:"msg"`
}

Jump to

Keyboard shortcuts

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