plugin

package
v0.6.0-beta Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("PluginNotFound")
)

Functions

func Call

func Call(ctx context.Context, ps types.PlugScope, req *pluginapi.Request) (resp *pluginapi.Response, err error)

func Init

func Init(svc buildin.Services, cfg config.Loader) error

func MustShutdown

func MustShutdown()

func Register

func Register(spec types.PluginSpec, builder Builder)

func SourceInfo

func SourceInfo(ctx context.Context, ps types.PlugScope) (info string, err error)

Types

type Builder

type Builder func(ctx context.Context, spec types.PluginSpec, scope types.PlugScope) (Plugin, error)

type DelayProcessPlugin

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

func (*DelayProcessPlugin) Name

func (d *DelayProcessPlugin) Name() string

func (*DelayProcessPlugin) Run

func (*DelayProcessPlugin) Type

func (*DelayProcessPlugin) Version

func (d *DelayProcessPlugin) Version() string

type Plugin

type Plugin interface {
	Name() string
	Type() types.PluginType
	Version() string
}

func BuildPlugin

func BuildPlugin(ctx context.Context, ps types.PlugScope) (Plugin, error)

type ProcessPlugin

type ProcessPlugin interface {
	Plugin
	Run(ctx context.Context, request *pluginapi.Request) (*pluginapi.Response, error)
}

type SourcePlugin

type SourcePlugin interface {
	ProcessPlugin
	SourceInfo() (string, error)
}

type ThreeBodyPlugin

type ThreeBodyPlugin struct{}

func (*ThreeBodyPlugin) Name

func (d *ThreeBodyPlugin) Name() string

func (*ThreeBodyPlugin) Run

func (*ThreeBodyPlugin) SourceInfo

func (d *ThreeBodyPlugin) SourceInfo() (string, error)

func (*ThreeBodyPlugin) Type

func (d *ThreeBodyPlugin) Type() types.PluginType

func (*ThreeBodyPlugin) Version

func (d *ThreeBodyPlugin) Version() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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