extension_kit

package module
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 1 Imported by: 38

README

ExtensionKit logo depicting a wrench within a rounded rectangle on the background

ExtensionKit

Through kits like ActionKit and DiscoveryKit, Steadybit can be extended with new capabilities. Such *Kit usages are called extensions. ExtensionKit contains helpful utilities and best practices for extension authors leveraging the Go programming language.

Installation

Add the following to your go.mod file:

go get github.com/steadybit/extension-kit

Documentation

Overview

Package extension_kit provides utilities to handle extension errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtensionError

type ExtensionError struct {
	// A human-readable explanation specific to this occurrence of the problem.
	Detail *string `json:"detail,omitempty"`

	// A URI reference that identifies the specific occurrence of the problem.
	Instance *string `json:"instance,omitempty"`

	// A short, human-readable summary of the problem type.
	Title string `json:"title"`

	// A URI reference that identifies the problem type.
	Type *string `json:"type,omitempty"`
}

ExtensionError is a generalization over ActionKit and DiscoveryKit error types. They are structurally identical and can be used interchangeably.

func ToError

func ToError(title string, err error) ExtensionError

ToError converts an error to an ExtensionError.

Directories

Path Synopsis
Package extcmd supports use cases in which a command is supposed be started non-blocking as a result of an incoming HTTP requests, e.g., ActionKit's start call.
Package extcmd supports use cases in which a command is supposed be started non-blocking as a result of an incoming HTTP requests, e.g., ActionKit's start call.
Package exthttp supports setup of HTTP servers to implement the *Kit contracts.
Package exthttp supports setup of HTTP servers to implement the *Kit contracts.
Package extlogging contains general utilities for extension logging.
Package extlogging contains general utilities for extension logging.
Package extutil contains a variety of util functions that were identified as common code duplication.
Package extutil contains a variety of util functions that were identified as common code duplication.

Jump to

Keyboard shortcuts

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