nats

package
v1.1.0-beta.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Module loads the NATS module providing an initialized client.

The module is only loaded once.

func NewEvent

func NewEvent(ctx context.Context, conn *nats.Conn) repository.Event

NewEvent returns an initialized NATS client that implements event repository.

Types

type Client

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

Client represents a NATS client that implements the event repository.

func NewClient

func NewClient(conn *nats.Conn) *Client

NewClient creates a new NATS client.

func (*Client) Publish

func (p *Client) Publish(ctx context.Context, outs []*v2.Event) (err error)

Publish publishes an event slice.

Jump to

Keyboard shortcuts

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