errors

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	POLICY_REPORT_IGNORE = "ignore"
	POLICY_REPORT_EVERY  = "report"
	POLICY_REPORT_ONCE   = "report-once"

	POLICY_METRIC_DROP = "drop"
	POLICY_METRIC_ZERO = "zero"

	POLICY_RETRY_YES = "retry"
	POLICY_RETRY_NO  = "stop"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

type Policy struct {
	Report string
	Metric string
	Retry  string
	// contains filtered or unexported fields
}

func NewPolicy

func NewPolicy(s string) *Policy

func (*Policy) ReportError

func (p *Policy) ReportError() bool

func (Policy) String

func (p Policy) String() string

type TruncateErrorPolicy added in v1.0.2

type TruncateErrorPolicy struct {
	Policy Policy
	// contains filtered or unexported fields
}

func NewTruncateErrorPolicy added in v1.0.2

func NewTruncateErrorPolicy(s string) *TruncateErrorPolicy

func (*TruncateErrorPolicy) TruncateError added in v1.0.2

func (p *TruncateErrorPolicy) TruncateError(err error, stop *bool, collectedMetrics []blip.MetricValue) ([]blip.MetricValue, error)

Handles errors related to truncating tables, specifically those in `performance_schema` where `TRUNCATE` is used to reset the collected performance metrics. This should be called to proces the result of a `TRUNCATE` query even if no error occurrred. It will handle adjusting the collected metric values as necessary based on the success or failure of `TRUNCATE` so that only metrics that were collected from a sample that had a valid collection interval are returned.

Jump to

Keyboard shortcuts

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