plugin

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 1 Imported by: 2

README

Akita Plugins

Akita plugins allow developers to dynamically add functionality to the Akita CLI without recompiling, through dynamically loaded shared libraries.

Currently, we use plugins for the Akita binary that we release, for the proprietary parts of the Akita CLI that are not open-source. We plan to eventually provide a way for the Akita community to share and distribute plugins.

How to Implement a Plugin

All plugins implement the AkitaPlugin interface, which allows the plugin to manipulate API traffic intercepted by the CLI using Akita IR format. The result is then uploaded to Akita Cloud to analysis.

Each plugin package must also export an LoadAkitaPlugin function that let's the CLI load the plugin.

To build and release the plugin, follow instructions in go's plugin package

How to Use Plugin

User can specify list of plugins on the command line as paths to shared libraries. For example:

akita learn --plugins /usr/local/lib/my_plugin.so

Documentation

Index

Constants

View Source
const (
	AkitaPluginLoaderName = "LoadAkitaPlugin"
)

Every plugin must export a function called "LoadAkitaPlugin" of type AkitaPluginLoader.

Variables

This section is empty.

Functions

This section is empty.

Types

type AkitaPlugin

type AkitaPlugin interface {
	// Name of the plugin.
	Name() string

	// Performs in place transformation on the given IR.
	// Returns a non-nil error if the error is not recoverable and all processing
	// should halt.
	Transform(*pb.Method) error
}

Interface implemented by all plugins.

type AkitaPluginLoader

type AkitaPluginLoader = func() (AkitaPlugin, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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