Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BenchmarkPlugin ¶
type BenchmarkPlugin struct {
// contains filtered or unexported fields
}
BenchmarkPlugin wraps symbols (functions and variables) exported by plugin github.com/wendigo/go-bind-plugin/internal/test_fixtures/benchmark_plugin
See docs at https://godoc.org/github.com/wendigo/go-bind-plugin/internal/test_fixtures/benchmark_plugin
func BindBenchmarkPlugin ¶
func BindBenchmarkPlugin(path string) (*BenchmarkPlugin, error)
BindBenchmarkPlugin loads plugin from the given path and binds symbols (variables and functions) to the BenchmarkPlugin struct.
func (*BenchmarkPlugin) String ¶
func (p *BenchmarkPlugin) String() string
String returnes textual representation of the wrapper. It provides info on exported symbols and variables.
func (*BenchmarkPlugin) Sum ¶
func (p *BenchmarkPlugin) Sum(in0 []uint64) uint64
Sum function was exported from plugin github.com/wendigo/go-bind-plugin/internal/test_fixtures/benchmark_plugin symbol 'Sum'
See docs at https://godoc.org/github.com/wendigo/go-bind-plugin/internal/test_fixtures/benchmark_plugin#Sum
type Cli ¶
type Cli struct {
// contains filtered or unexported fields
}
Cli is responsible for generating plugin wrapper, can be initialized with New()
func (*Cli) GenerateFile ¶
GenerateFile generates wrapper file for plugin
type Config ¶
type Config struct {
// Path to the plugin
PluginPath string
// Plugin's package (will be used to compile plugin when PluginPath does not exist)
PluginPackage string
// Path where generated wrapper will be written
OutputPath string
// Name of the struct/interface that will be generated
OutputName string
// Dereference variables exported by plugin
DereferenceVariables bool
// Generate SHA256 for existing/compiled plugin and write it to the Bind* function
CheckSha256 bool
// Format generated code using gofmt -s -w
FormatCode bool
// Rebuild plugin from sources even if *.so exists at PluginPath
ForcePluginRebuild bool
// Package name of the generated file
OutputPackage string
// Do not export plugin's variables
HideVariables bool
// Generate interface and return it in Bind* function instead of struct (enables HideVariables)
AsInterface bool
}
Config for Cli
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
test_fixtures/basic_plugin
command
|
|
|
test_fixtures/benchmark_plugin
command
|
|
|
test_fixtures/complex_plugin
command
|
|