background

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCriticalToStop

func IsCriticalToStop(t Process) bool

IsCriticalToStop verifying if task critical to execute

Types

type Process

type Process interface {
	// GetName of the task
	GetName() string
	// GetSeverity of the task
	GetSeverity() ProcessSeverity
	// OnStart event to be called when main loop will be started
	OnStart(ctx context.Context) error
	// OnStop event to be called when main loop will be started
	OnStop(ctx context.Context) error
}

Process that must be executed inside microservice, could be a server, events, parsers, aggregators etc...

type ProcessSeverity

type ProcessSeverity byte

ProcessSeverity identify how is imported background task is to execute

const (
	TaskSeverityMajor ProcessSeverity = iota
	TaskSeverityMinor
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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