plugin

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	ID              string         `json:"id" bson:"_id"`
	Satellite       string         `json:"satellite"`
	Name            string         `json:"name"`
	Description     string         `json:"description"`
	Type            string         `json:"type"`
	Options         map[string]any `json:"options"`
	FrontendOptions map[string]any `json:"frontendOptions"`
	UpdatedAt       int64          `json:"updatedAt"`
}

Instance is the structure of the configuration for a single plugin instance. Each plugin must contain a name and a type and an optionsl description. It can also contains a map with additional options. The options can be used to specify the addess, username, password, etc. to access an service within the plugin.

type MountFn

type MountFn func(instances []Instance, clustersClient clusters.Client) (chi.Router, error)

MountFn is the type of the mount function, which must be implemented by all plugins, so that the can be used within kobs. We pass the instances for the corresponding plugin type and the clusters client to the mount function. The function must return a chi router or an error, if the mounting of the plugin fails.

Jump to

Keyboard shortcuts

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