provider

package
v0.0.0-...-0117b6e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package provider implements logic for allowing interaction with worker processes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IProvider

type IProvider interface {
	Start(map[string]*model.WorkerConfig, []*message.Message)
	Monitor(map[string]*model.WorkerConfig, []*message.Message)
	KillAllWorkerProcesses()
}

IProvider is the interface for check process status and starts the process if it's not running

type WorkerProvider

type WorkerProvider struct {
	sync.Mutex
	// contains filtered or unexported fields
}

WorkerProvider owns workerPool, it auto discovers the worker config and the running processes

func NewWorkerProvider

func NewWorkerProvider(context context.ICoreAgentContext, exec executor.IExecutor) *WorkerProvider

NewWorkerProvider creates worker provider instance

func (*WorkerProvider) KillAllWorkerProcesses

func (w *WorkerProvider) KillAllWorkerProcesses()

func (*WorkerProvider) Monitor

func (w *WorkerProvider) Monitor(configs map[string]*model.WorkerConfig, pingResults []*message.Message)

func (*WorkerProvider) Start

func (w *WorkerProvider) Start(configs map[string]*model.WorkerConfig, pingResults []*message.Message)

Start discovers the worker config and the running processes It starts a new process for the worker if the worker has no running process

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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