plugin

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 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(chQuit chan error) (chan Message, error)

func (*FBPlugin) Stop

func (p *FBPlugin) Stop() error

type MW

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

func NewMiddleware

func NewMiddleware(plugin Plugin, chQuit chan error) (*MW, error)

func (*MW) Shutdown

func (mw *MW) Shutdown()

func (*MW) Wrap

func (mw *MW) Wrap(next http.Handler) http.Handler

type Message

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

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(chQuit 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