worker

package
v0.0.0-...-bd9c4bf Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDNSProvider

func GetDNSProvider(
	logger *slog.Logger,
) dns.Provider

GetDNSProvider returns a DNS provider handler based on the system platform. It selects the appropriate DNS provider implementation depending on the OS platform detected (e.g., Ubuntu-specific vs. general Linux). This allows platform-specific DNS configurations to be handled in a unified manner.

Types

type ServerManager

type ServerManager interface {
	// Start starts the worker and listens for signals to shut down gracefully.
	Start(ctx context.Context)
}

ServerManager responsible for Server operations.

type Worker

type Worker struct {
	ClientManager client.Manager
	// contains filtered or unexported fields
}

Worker implementation of the task worker operations.

func New

func New(
	appFs afero.Fs,
	appConfig config.Config,
	logger *slog.Logger,
	cm client.Manager,
) *Worker

New initialize and configure a new queue Worker service.

func (*Worker) Start

func (w *Worker) Start(ctx context.Context)

Start begins the worker process, subscribing to a JetStream stream and processing messages until the context is canceled.

Jump to

Keyboard shortcuts

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