worker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = data.ModuleName + "-worker"

Variables

This section is empty.

Functions

func CtxWorkerInstance

func CtxWorkerInstance(entry interface{}, ctx context.Context) context.Context

func NewWorkerAsInterface

func NewWorkerAsInterface(cfg config.Config, ctx context.Context) interface{}

func RunWorkerAsInterface

func RunWorkerAsInterface(structure interface{}, ctx context.Context)

Types

type IWorker

type IWorker interface {
	Run(ctx context.Context)
	ProcessPermissions(_ context.Context) error
	GetEstimatedTime() time.Duration
}

type Worker

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

func WorkerInstance

func WorkerInstance(ctx context.Context) *Worker

func (*Worker) GetEstimatedTime

func (w *Worker) GetEstimatedTime() time.Duration

func (*Worker) ProcessPermissions

func (w *Worker) ProcessPermissions(_ context.Context) error

func (*Worker) RefreshModule

func (w *Worker) RefreshModule() (string, error)

func (*Worker) RefreshSubmodules

func (w *Worker) RefreshSubmodules(msg data.ModulePayload) (string, error)

func (*Worker) Run

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

Jump to

Keyboard shortcuts

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