metrics

package
v1.11.47 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpMetric

func DumpMetric(metric *Metric) ([]byte, error)

func DumpStatus

func DumpStatus(err error) ([]byte, int, error)

func GetFailedStatus

func GetFailedStatus(err error) []byte

Types

type Metric

type Metric struct {
	DomainName string                 `json:"domain_name"`
	Metrics    map[string]interface{} `json:"metrics,omitempty"`
}

func FormPolicyMetrics

func FormPolicyMetrics(policiesStatus []PolicyStatus) []*Metric

func NewMetric

func NewMetric() *Metric

NewMetric creates a metric type

type PolicyStatus

type PolicyStatus struct {
	DomainName     string
	ValidSignature bool
	FileExists     bool
	Expiry         time.Duration
}

type StatusMetric

type StatusMetric struct {
	Application string `json:"application"`
	Code        int    `json:"status_code"`
	Message     string `json:"status_msg"`
}

func NewStatusMetric

func NewStatusMetric() *StatusMetric

Jump to

Keyboard shortcuts

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