service

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Verbose        bool
	DefaultTimeout durationWrapper                 `toml:"default_timeout"`
	Executables    map[string]ExecutableDefinition `toml:"executable"`
	Listen         string
}

type ExecutableDefinition

type ExecutableDefinition struct {
	Path                string
	HealthCheckArgument string `toml:"healthcheck_argument"`
}

type Result

type Result struct {
	StdOut     string
	ResultCode int
	StdError   string
}

type Service

type Service struct {
	Config *Config
}

func New

func New(config *Config) (*Service, error)

func (*Service) Handle

func (receiver *Service) Handle(ctx context.Context, id string, timeOut time.Duration, args string) (*Result, error)

func (*Service) String

func (receiver *Service) String() string

type ValidationError

type ValidationError struct {
	Path     string
	StdError string
	ExitCode int
}

func (ValidationError) Error

func (v ValidationError) Error() string

Jump to

Keyboard shortcuts

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