health

package
v0.0.0-...-f0e02fd Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	REQUESTS_BY_CIRCLE         = "req/s"
	REQUESTS_ERRORS_BY_CIRCLE  = "%"
	REQUESTS_LATENCY_BY_CIRCLE = "ms"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CircleComponentHealthRepresentation

type CircleComponentHealthRepresentation struct {
	Name      string  `json:"name"`
	Threshold float64 `json:"threshold"`
	Value     float64 `json:"value"`
	Status    string  `json:"status"`
}

type CircleHealthRepresentation

type CircleHealthRepresentation struct {
	Requests CircleRequestsRepresentation   `json:"requests"`
	Latency  CircleHealthTypeRepresentation `json:"latency"`
	Errors   CircleHealthTypeRepresentation `json:"errors"`
}

type CircleHealthTypeRepresentation

type CircleHealthTypeRepresentation struct {
	Unit             string                                `json:"unit"`
	CircleComponents []CircleComponentHealthRepresentation `json:"circleComponents"`
}

type CircleRequestsRepresentation

type CircleRequestsRepresentation struct {
	Value float64 `json:"value"`
	Unit  string  `json:"unit"`
}

type ComponentMetricRepresentation

type ComponentMetricRepresentation struct {
	Period     string                    `json:"period"`
	Type       string                    `json:"type"`
	Components []ComponentRepresentation `json:"components"`
}

type ComponentRepresentation

type ComponentRepresentation struct {
	Name   string                `json:"name"`
	Module string                `json:"module"`
	Data   []datasourcePKG.Value `json:"data"`
}

type DeploymentInCircle

type DeploymentInCircle struct {
	Id               string  `json:"id"`
	Name             string  `json:"name"`
	ErrorThreshold   float64 `json:"errorThreshold"`
	LatencyThreshold float64 `json:"latencyThreshold"`
	ModuleId         string  `json:"moduleId"`
	ModuleName       string  `json:"moduleName"`
}

type Main

type Main struct {
	// contains filtered or unexported fields
}

func (Main) Components

func (main Main) Components(circleIDHeader, circleId, projectionType, metricType string, workspaceID uuid.UUID) (ComponentMetricRepresentation, error)

func (Main) ComponentsHealth

func (main Main) ComponentsHealth(circleIDHeader, circleId string, workspaceID uuid.UUID) (CircleHealthRepresentation, error)

func (Main) GetAverageHttpErrorsPercentageStringQuery

func (main Main) GetAverageHttpErrorsPercentageStringQuery(circleSource string) string

func (Main) GetAverageLatencyStringQuery

func (main Main) GetAverageLatencyStringQuery(circleSource string) string

type UseCases

type UseCases interface {
	Components(circleIDHeader, circleId, projectionType, metricType string, workspaceID uuid.UUID) (ComponentMetricRepresentation, error)
	ComponentsHealth(circleIDHeader, circleId string, workspaceID uuid.UUID) (CircleHealthRepresentation, error)
}

func NewMain

func NewMain(db *gorm.DB, datasource datasource.UseCases, pluginMain plugin.UseCases, mooveMain moove.APIClient) UseCases

Jump to

Keyboard shortcuts

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