jetstream

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Writer implements a JetStream writer. It writes messages asynchronously.

func NewWriter

func NewWriter(params WriterParams) (*Writer, error)

NewWriter creates new instance of the Writer.

func (*Writer) Close

func (w *Writer) Close() error

Close closes the underlying NATS connection.

func (*Writer) Write

func (w *Writer) Write(record sdk.Record) error

Write synchronously writes a record.

type WriterParams

type WriterParams struct {
	Conn          *nats.Conn
	Subject       string
	RetryWait     time.Duration
	RetryAttempts int
}

WriterParams is an incoming params for the NewWriter function.

Jump to

Keyboard shortcuts

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