debug

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 4 Imported by: 0

README

= Debug plugin
:toc: macro

The debug plugin provides checks and alerts for use when developing or testing Goplum.
These probably aren't of interest to you if you just want to run Goplum.

== Checks

=== debug.random

[source,goplum]
----
check debug.random "example" {
  percent_good = 0.8
}
----

Passes or fails at random. If the `percent_good` parameter is specified then checks will pass with
that probability (i.e. a value of 0.8 means a check has an 80% chance to pass).

== Alerts

=== debug.sysout

[source,goplum]
----
alert debug.sysout "example" {}
----

Prints alerts to system out, prefixed with 'DEBUG ALERT'.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct{}

func (Plugin) Alert added in v0.2.0

func (p Plugin) Alert(kind string) goplum.Alert

func (Plugin) Check added in v0.2.0

func (p Plugin) Check(kind string) goplum.Check

type RandomCheck

type RandomCheck struct {
	PercentGood float64 `config:"percent_good"`
}

func (RandomCheck) Execute

func (t RandomCheck) Execute(_ context.Context) goplum.Result

type SysOutAlert

type SysOutAlert struct {
}

func (SysOutAlert) Send

func (s SysOutAlert) Send(details goplum.AlertDetails) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳