plugin

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FBPlugin

type FBPlugin struct {
	// contains filtered or unexported fields
}

FBPlugin is a plugin which communicates using FlatBuffer messages.

func NewFBPlugin

func NewFBPlugin(path string) *FBPlugin

NewFBPlugin creates a new plugin instance. In order to start the plugin, call the Start() function.

func (*FBPlugin) Name

func (p *FBPlugin) Name() string

func (*FBPlugin) Start

func (p *FBPlugin) Start(chErr chan error) (chan Message, error)

func (*FBPlugin) Stop

func (p *FBPlugin) Stop() error

type Message

type Message struct {
	// contains filtered or unexported fields
}

type Middleware added in v0.4.0

type Middleware struct {
	// contains filtered or unexported fields
}

func NewMiddleware

func NewMiddleware(plugin Plugin, chErr chan error) (*Middleware, error)

func (*Middleware) Errors added in v0.4.0

func (mw *Middleware) Errors() <-chan error

func (*Middleware) Middleware added in v0.4.0

func (mw *Middleware) Middleware() func(http.Handler) http.Handler

func (*Middleware) Stop added in v0.4.0

func (mw *Middleware) Stop()

type Plugin

type Plugin interface {
	// Name returns a name identifying the plugin.
	Name() string

	// Start starts the plugin but does not wait for it to complete.
	//
	// It returns a channel which must be used to deliver messages to the plugin.
	// This channel must be closed when there are no more messages to be delivered.
	//
	// After a successful call to Start the Stop method must be called in
	// order to release associated system resources.
	Start(chan error) (chan Message, error)

	// Stop stops the plugin and release system resources.
	Stop() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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