Documentation ¶
Index ¶
Constants ¶
View Source
const (
PluginModeEnvVar = "OPNI_PLUGIN_MODE"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtendedPluginMeta ¶ added in v0.8.0
type ExtendedPluginMeta struct {
ModeList ModeList
}
type ModeList ¶ added in v0.8.0
type ModeList struct {
Modes []PluginMode `json:"modes"`
}
func QueryPluginModes ¶ added in v0.8.0
type ModeSet ¶ added in v0.8.0
type ModeSet map[PluginMode]SchemeFunc
func (ModeSet) MarshalJSON ¶ added in v0.8.0
type PluginMeta ¶
type PluginMeta struct { BinaryPath string GoVersion string Module string // Extended metadata not populated from build info. ExtendedMetadata *ExtendedPluginMeta }
func ReadFile ¶ added in v0.8.0
func ReadFile(f file) (PluginMeta, error)
Reads relevant metadata from an opened file. Does not change the i/o offset of the file.
func ReadMetadata ¶
func ReadMetadata() PluginMeta
func ReadPath ¶ added in v0.8.0
func ReadPath(path string) (PluginMeta, error)
Reads relevant metadata from the binary at the given path.
func (PluginMeta) Filename ¶ added in v0.8.0
func (pm PluginMeta) Filename() string
type PluginMode ¶ added in v0.6.0
type PluginMode string
const ( ModeGateway PluginMode = "gateway" ModeAgent PluginMode = "agent" ModeListModes PluginMode = "__list_modes__" )
func (PluginMode) IsValid ¶ added in v0.8.0
func (m PluginMode) IsValid() bool
type Scheme ¶
type Scheme interface { Add(string, plugin.Plugin) PluginMap() map[string]plugin.Plugin Mode() PluginMode }
func NewScheme ¶
func NewScheme(opts ...SchemeOption) Scheme
type SchemeFunc ¶ added in v0.8.0
type SchemeOption ¶ added in v0.6.0
type SchemeOption func(*SchemeOptions)
func WithMode ¶ added in v0.6.0
func WithMode(mode PluginMode) SchemeOption
type SchemeOptions ¶ added in v0.6.0
type SchemeOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.