service

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(runner Runner) (int, error)

Types

type AgentParams

type AgentParams struct {
	Name                string
	AgentExecutablePath string
	OrgId               string
	ConfigFilePath      string
	LogFilePath         string
}

type Runner

type Runner interface {
	Name() string
	Execute(stop <-chan struct{}, running chan<- struct{}) ServiceExitCode
}

type Service

type Service interface {
	Start() error
	Stop() error
	Close() error
	Delete() error
	IsActive() bool
}

func Create

func Create(params AgentParams) (Service, error)

func Open

func Open(name string) (Service, error)

type ServiceExitCode added in v0.9.0

type ServiceExitCode int
const (
	GenericError ServiceExitCode = 1
	ConfigError  ServiceExitCode = 2
	LogFileError ServiceExitCode = 3
)

Jump to

Keyboard shortcuts

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