natsio

package
v0.0.0-...-c304cca Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScanQueue        = "scans"
	ScanStartSubj    = "scan.start"
	ScanCompleteSubj = "scan.complete"
	ScanRetrySubj    = "scan.retry"
	ScanFailSubj     = "scan.fail"
)

Variables

This section is empty.

Functions

func Connect

func Connect(name string) (*nats.Conn, error)

Types

type Nats

type Nats struct {
	Conn *nats.Conn

	L  zerolog.Logger
	C  *config.Conf
	DB *mongo.Database
}

func New

func New(conn *nats.Conn, l zerolog.Logger, cfg *config.Conf, db *mongo.Database) *Nats

func (*Nats) InitSubscribers

func (n *Nats) InitSubscribers() error

type ScanError

type ScanError struct {
	Message string   `json:"message,omitempty"`
	Scan    api.Scan `json:"scan"`
}

Jump to

Keyboard shortcuts

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