agent_plugin

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 8 Imported by: 0

README

go build -buildmode=plugin -o plugins/timer_task.so plugins/timer_task.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	Load() error
	Available() bool

	Enable() error
	Disable() error

	Execute(ctx context.Context, in ...[]byte) (output []byte, err error)
}

type PluginExecutor

type PluginExecutor struct {
}

func (*PluginExecutor) Execute

func (p *PluginExecutor) Execute(pluginName string) error

type PluginOutPut

type PluginOutPut struct {
	Status  string
	Message string
	Error   string
	Code    int
	Data    interface{}
}

type Scanner

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

func NewScanner

func NewScanner(path ...string) *Scanner

func (*Scanner) ListAllPlugin

func (s *Scanner) ListAllPlugin() ([]Plugin, error)

func (*Scanner) ListAvailablePlugin

func (s *Scanner) ListAvailablePlugin() ([]Plugin, error)

func (*Scanner) LoadPlugin

func (s *Scanner) LoadPlugin() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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