plugin

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

README

sloth.dev/core/debug/v1

A simple debug plugin used for testing and debugging purposes. For example it can be used to print the SLO mutations of the objects while developing other plugins in a plugin chain easily.

The plugin will use debug level on the logger, so you will need to run sloth with in debug mode to check the debug messages from this plugin.

Config

  • msg(Optional): A custom message to be logged by the plugin.
  • result(Optional): If true logs the plugin received result struct.
  • request(Optional): If true logs the plugin received request struct.

Env vars

None

Order requirement

None

Usage examples

Simple message log
chain:
  - id: "sloth.dev/core/debug/v1"
    config:
      msg: "Hello world"
Log everything as last plugin
chain:
  - id: "sloth.dev/core/debug/v1"
    priority: 9999999
    config: {msg: "Last plugin", result: true, request: true}

Documentation

Index

Constants

View Source
const (
	PluginVersion = "prometheus/slo/v1"
	PluginID      = "sloth.dev/core/debug/v1"
)

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(configData json.RawMessage, appUtils pluginslov1.AppUtils) (pluginslov1.Plugin, error)

Types

type Config

type Config struct {
	CustomMsg   string `json:"msg,omitempty"`
	ShowResult  bool   `json:"result,omitempty"`
	ShowRequest bool   `json:"request,omitempty"`
}

Jump to

Keyboard shortcuts

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