api

package
v0.44.3 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

type Duration time.Duration

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

type InputConfig

type InputConfig struct {

	// StartTime when set, represents the beginning of the metric time range
	// This defaults to EndTime - Duration when duration is set.
	StartTime *time.Time `json:"startTime,omitempty"`
	// EndTime when set, represents end of the metric time range
	// This defaults to the current time
	EndTime *time.Time `json:"endTime,omitempty"`
	// Duration represents how long to go back from EndTime when creating the metric time range
	// This is mutually exclusive with the StartTime value. Only one of these
	// two values can be set.
	Duration *Duration `json:"duration,omitempty"`

	PrometheusURL         string `json:"prometheusURL"`
	PrometheusUserName    string `json:"prometheusUserName"`
	PrometheusPassword    string `json:"prometheusPassword"`
	PrometheusBearerToken string `json:"prometheusBearerToken"`
	PrometheusVerifyTLS   bool   `json:"prometheusVerifyTLS"`

	ThresholdExpectations map[ResultType]InputThreshold `json:"thresholdExpectations,omitempty"`
}

func ReadInputFile

func ReadInputFile(filePath string) (*InputConfig, error)

func (*InputConfig) GetDuration

func (i *InputConfig) GetDuration() time.Duration

type InputThreshold

type InputThreshold struct {
	Value float64 `json:"value"`
}

type Result

type Result struct {
	Values map[ResultType]ResultValue
}

func (*Result) DumpToFile

func (r *Result) DumpToFile(filePath string) error

func (*Result) DumpToStdout

func (r *Result) DumpToStdout() error

type ResultType

type ResultType string
const (
	ResultTypeVMICreationToRunningP99 ResultType = "vmiCreationToRunningSecondsP99"
	ResultTypeVMICreationToRunningP95 ResultType = "vmiCreationToRunningSecondsP95"
	ResultTypeVMICreationToRunningP50 ResultType = "vmiCreationToRunningSecondsP50"
)

type ResultValue

type ResultValue struct {
	Value           float64          `json:"value"`
	ThresholdResult *ThresholdResult `json:"thresholdResult,omitempty"`
}

type ThresholdResult

type ThresholdResult struct {
	ThresholdValue    float64 `json:"thresholdValue"`
	ThresholdExceeded bool    `json:"thresholdExceeded"`
}

Jump to

Keyboard shortcuts

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