v0.6.1 Latest Latest

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 6 Imported by: 18




View Source
const APIVersion = "1.0.0"

APIVersion version of current API


View Source
var (
	// ErrInvalidArgs invalid arguments
	ErrInvalidArgs = errors.New("plugin: invalid arguments")


func Version

func Version() string


type Descriptor

type Descriptor struct {
	V string
	N string
	D string
	T string

Descriptor describes plugin

func (*Descriptor) Desc

func (b *Descriptor) Desc() string

Desc of plugin

func (*Descriptor) Name

func (b *Descriptor) Name() string

Name of plugin

func (*Descriptor) Type

func (b *Descriptor) Type() string

Type of plugin

func (*Descriptor) Version

func (b *Descriptor) Version() (string, string)

Version of plugin. Version format format major.minor.patch returns API version plugin is built with

plugin version

type HTTP

type HTTP interface {
	GetHTTPServer(port string) HTTPHandler

HTTP ...

type HTTPHandler

type HTTPHandler interface {
	Mux() *http.ServeMux
	Addr() string

HTTPHandler provided by VolantMQ server

type Health

type Health interface {
	GetHealth() healthcheck.Checks

Health ...

type Info

type Info interface {
	// Version in format major.minor.patch
	Version() (string, string)
	// Name plugin name
	Name() string
	// Desc plugin description
	Desc() string
	// Type plugin type
	Type() string

Info return plugin information

type Messaging

type Messaging interface {
	GetSubscriber(id string) (vlsubscriber.IFace, error)

nolint: golint

type Must

type Must interface {
	Shutdown() error

nolint: golint

type Plugin

type Plugin interface {
	// Init initialize plugin
	// might accepts interface which specifies config
	// return interface to plugin entry
	Load(interface{}, *SysParams) (interface{}, error)

	// Info plugin information
	Info() Info

Plugin entry to plugin

type SysParams

type SysParams struct {
	Log            *zap.SugaredLogger
	SignalFailure  func(name, msg string)
	Version        string
	BuildTimestamp string

SysParams system-wide config passed to plugin

Jump to

Keyboard shortcuts

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