worker

package
v0.0.0-...-0c3af6b Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package worker implements a message-based worker for the boomer service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	Subscribe(subj string, cb nats.MsgHandler) (*nats.Subscription, error)
}

Connection is an interface for subscribing to messages

type Worker

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

Worker processes and responds to requests from a message queue

func New

func New(c Connection) (*Worker, error)

New creates a new boomer worker

func (*Worker) Handler

func (w *Worker) Handler(msg *nats.Msg)

Handler processes and responds to the nats.Msg.

Jump to

Keyboard shortcuts

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