pubsub

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 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(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 opencdc.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