pkg

package
v3.0.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	LoadPluginsDir(directory string) error
	LoadPlugins(v ...Plugin) error
	Walk(func(manifest Manifest, v Plugin))
	GetPlugins() []Plugin
}

Handler defines a set of functions that can be used by plugins and the application see pkg/handler for implementation of interface

type Manifest

type Manifest struct {
	Namespace   string
	Description string
	Data        map[string]interface{}
}

Manifest defines the requirements of a plugin to the handler

type Plugin

type Plugin interface {
	Manifest() Manifest
	Setup(h Handler) error
}

Basic plugin interface This contains the definition for a plugin required by the handler See Service for how this can be extended to provide more functionality

type Service

type Service interface {
	Plugin
	Start()
}

Service defines a service plugin service plugins are started as a go routine when the plugin is registered

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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