Documentation
¶
Overview ¶
Package config creates an osquery configuration plugin.
See https://osquery.readthedocs.io/en/latest/development/config-plugins/ for more.
Index ¶
- type GenerateConfigsFunc
- type Plugin
- func (t *Plugin) Call(ctx context.Context, request osquery.ExtensionPluginRequest) osquery.ExtensionResponse
- func (t *Plugin) Name() string
- func (t *Plugin) Ping() osquery.ExtensionStatus
- func (t *Plugin) RegistryName() string
- func (t *Plugin) Routes() osquery.ExtensionPluginResponse
- func (t *Plugin) Shutdown()
- type RefreshConfigsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenerateConfigsFunc ¶
GenerateConfigsFunc returns the configurations generated by this plugin. The returned map should use the source name as key, and the config JSON as values. The context argument can optionally be used for cancellation in long-running operations.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin is an osquery configuration plugin. Plugin implements the OsqueryPlugin interface.
func NewPlugin ¶
func NewPlugin(name string, gen GenerateConfigsFunc, ref RefreshConfigsFunc) *Plugin
NewPlugin takes a value that implements ConfigPlugin and wraps it with the appropriate methods to satisfy the OsqueryPlugin interface. Use this to easily create configuration plugins.
func (*Plugin) Call ¶
func (t *Plugin) Call(ctx context.Context, request osquery.ExtensionPluginRequest) osquery.ExtensionResponse
Call is the entry point method into config plugin. "action" will be part of the request. It should either be "genConfig" or "refresh".
func (*Plugin) RegistryName ¶
RegistryName returns the registry name which is always "config" for config plugin.
func (*Plugin) Routes ¶
func (t *Plugin) Routes() osquery.ExtensionPluginResponse
Routes returns empty plugin response.
type RefreshConfigsFunc ¶ added in v0.4.0
type RefreshConfigsFunc func(ctx context.Context, request osquery.ExtensionPluginRequest) osquery.ExtensionResponse
RefreshConfigsFunc is called by Osquery to provide latest configuration. Plugin's can optionally implement this method if they are interested in full configuration.