plugins

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 2 Imported by: 40

Documentation

Overview

Package plugins and its subpackages provide high-level constructs to easily develop plugins, abstracting all the low-level details of the plugin framework. This bundles the main plugin developer tools provided by the SDK. Plugin developers are encouraged to use the constructs of the plugins package for their plugins.

This packages depends on the lower-level prebuilt C symbols implementations of the sdk/symbols package. For some use cases, developers can consider using the the sdk/symbols package to customize their usage of the SDK. This is meaningful only if developers wish to manually write part of the low-level C details of the plugin framework, but still want to use some parts of the SDK. This is discouraged if not for advanced use cases only, and developers are instead encouraged to rely on the plugins package to build their plugins.

Most of the time, a plugin author only needs to import the following packages, which provide the "default" streamlined interfaces to implementing a source or extractor plugin:

"github.com/falcosecurity/plugin-sdk-go/pkg/sdk"
"github.com/falcosecurity/plugin-sdk-go/pkg/sdk/plugins"
"github.com/falcosecurity/plugin-sdk-go/pkg/sdk/plugins/{source,extractor}"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEvents

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

BaseEvents is a base implementation of the sdk.Events interface.

func (*BaseEvents) Events

func (b *BaseEvents) Events() sdk.EventWriters

func (*BaseEvents) SetEvents

func (b *BaseEvents) SetEvents(events sdk.EventWriters)

type BaseExtractRequests

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

BaseExtractRequests is a base implementation of the sdk.ExtractRequests interface.

func (*BaseExtractRequests) ExtractRequests

func (b *BaseExtractRequests) ExtractRequests() sdk.ExtractRequestPool

func (*BaseExtractRequests) SetExtractRequests

func (b *BaseExtractRequests) SetExtractRequests(pool sdk.ExtractRequestPool)

type BaseLastError

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

BaseLastError is a base implementation of the sdk.LastError interface.

func (*BaseLastError) LastError

func (b *BaseLastError) LastError() error

func (*BaseLastError) LastErrorBuffer

func (b *BaseLastError) LastErrorBuffer() sdk.StringBuffer

func (*BaseLastError) SetLastError

func (b *BaseLastError) SetLastError(err error)

type BaseOpenParams

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

BaseOpenParams is a base implementation of the sdk.OpenParamsBuffer interface.

func (*BaseOpenParams) OpenParamsBuffer

func (b *BaseOpenParams) OpenParamsBuffer() sdk.StringBuffer

type BasePlugin

BasePlugin is a base implementation of the Plugin interface. Developer-defined Plugin implementations should be composed with BasePlugin to have out-of-the-box compliance with all the required interfaces.

type BaseProgress

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

BaseProgress is a base implementation of the sdk.ProgressBuffer interface.

func (*BaseProgress) ProgressBuffer

func (b *BaseProgress) ProgressBuffer() sdk.StringBuffer

type BaseStringer

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

BaseStringer is a base implementation of the sdk.StringerBuffer interface.

func (*BaseStringer) StringerBuffer

func (b *BaseStringer) StringerBuffer() sdk.StringBuffer

type Info

type Info struct {
	ID                  uint32
	Name                string
	Description         string
	EventSource         string
	Contact             string
	Version             string
	RequiredAPIVersion  string
	ExtractEventSources []string
}

Info is a struct containing the general information about a plugin.

type Plugin

type Plugin interface {
	// (optional): sdk.Destroyer
	// (optional): sdk.InitSchema
	sdk.LastError
	sdk.LastErrorBuffer
	//
	// Info returns a pointer to a Info struct, containing
	// all the general information about this plugin.
	Info() *Info
	//
	// Init initializes this plugin with a given config string.
	// A successful call to init returns a nil error.
	Init(config string) error
}

Plugin is an interface representing a plugin. Implementations of this interface can optionally implement the sdk.Destroy interface to specify a Destroy method will be called during the plugin deinitialization.

Directories

Path Synopsis
Package extractor provides high-level constructs to easily build extractor plugins.
Package extractor provides high-level constructs to easily build extractor plugins.
Package source provides high-level constructs to easily build source plugins.
Package source provides high-level constructs to easily build source plugins.

Jump to

Keyboard shortcuts

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