nats

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunEmbeddedNATSServer

func RunEmbeddedNATSServer(cfg Config) (*nats.Conn, *server.Server, error)

Types

type CDCPublisher

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

func NewCDCPublisher

func NewCDCPublisher(nc *nats.Conn, url string, stream string, maxAge time.Duration, timeout time.Duration) (*CDCPublisher, error)

func (*CDCPublisher) Publish

func (p *CDCPublisher) Publish(cs *sqlite.ChangeSet) error

type CDCSubscriber

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

func NewCDCSubscriber

func NewCDCSubscriber(node string, nc *nats.Conn, url string, stream string, policy string, db *sql.DB) (*CDCSubscriber, error)

func (*CDCSubscriber) Close

func (s *CDCSubscriber) Close()

type Config

type Config struct {
	Name     string
	Port     int
	StoreDir string
	File     string
}

Jump to

Keyboard shortcuts

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