plugin

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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