pubsub

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 3 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 {
	// contains filtered or unexported fields
}

Writer implements a PubSub writer. It writes messages synchronously. It doesn't support batching/async writing.

func NewWriter

func NewWriter(ctx context.Context, params WriterParams) (*Writer, error)

NewWriter creates new instance of the Writer.

func (*Writer) Close

func (w *Writer) Close(ctx context.Context) error

Close closes the underlying NATS connection.

func (*Writer) Write

func (w *Writer) Write(ctx context.Context, record sdk.Record) error

Write writes directly and synchronously a record to a subject.

type WriterParams

type WriterParams struct {
	Conn    *nats.Conn
	Subject string
}

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