system

package
v1.2.2-dev.106 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const Metrics = "metrics"

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonResultValue

type CommonResultValue struct {
	Operation string `json:"operation"`
	Service   string `json:"service"`
	Executor  string `json:"executor"`
	Success   bool   `json:"Success"`
}

CommonResultValue contains the fields common to all request results (regardless of whether the result indicates success or failure).

type FailureResult

type FailureResult struct {
	CommonResultValue
	ErrorMessage string `json:"errorMessage"`
}

FailureResult contains the fields to e returned for a failed request.

type MetricsSuccessResult

type MetricsSuccessResult struct {
	CommonResultValue
	MetricsResultValue metricsResultValue `json:"result"`
}

MetricsSuccessResult contains the fields to be returned for a successful metrics request.

type Result

type Result interface {
	// contains filtered or unexported methods
}

Result provides a generic interface implemented by receivers intended to return their struct as a request result.

func Failure

func Failure(serviceName, operation, executor, errorMessage string) Result

Failure function returns a FailureResult as a Result abstraction.

func MetricsSuccess

func MetricsSuccess(serviceName, executor string, cpuUsedPercent float64, memoryUsed int64, raw []byte) Result

MetricsSuccess function returns a MetricsSuccessResult as a Result abstraction.

func Success

func Success(serviceName, operation, executor string) Result

Success function returns a SuccessResult as a Result abstraction.

type SuccessResult

type SuccessResult struct {
	CommonResultValue
}

SuccessResult contains the fields to be returned for a successful start/stop/restart operation request.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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