plugin

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPluginPath     = "/var/lib/nanafs/plugins"
	DefaultRegisterPeriod = time.Minute * 1
)

Variables

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

Functions

func Call

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

func Init

func Init(cfg config.Config, recorderGetter metastore.PluginRecorderGetter) error

func Register

func Register(ctx context.Context, plugin Plugin)

Types

type Plugin

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

type RunnablePlugin

type RunnablePlugin interface {
	Plugin
	Run(ctx context.Context, request *common.Request, params map[string]string) (*common.Response, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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