fileset

package
v5.5.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fileset

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

Fileset struct is the representation of a fileset.

func New

func New(
	modulesPath string,
	name string,
	mcfg *ModuleConfig,
	fcfg *FilesetConfig) (*Fileset, error)

New allocates a new Fileset object with the given configuration.

func (*Fileset) GetPipeline

func (fs *Fileset) GetPipeline() (pipelineID string, content map[string]interface{}, err error)

func (*Fileset) GetRequiredProcessors

func (fs *Fileset) GetRequiredProcessors() []ProcessorRequirement

GetRequiredProcessors returns the list of processors on which this fileset depends.

func (*Fileset) Read

func (fs *Fileset) Read(beatVersion string) error

Read reads the manifest file and evaluates the variables.

type FilesetConfig

type FilesetConfig struct {
	Enabled    *bool                  `config:"enabled"`
	Var        map[string]interface{} `config:"var"`
	Prospector map[string]interface{} `config:"prospector"`
}

FilesetConfig contains the configuration file options for a fileset

type ModuleConfig

type ModuleConfig struct {
	Module  string `config:"module"     validate:"required"`
	Enabled *bool  `config:"enabled"`

	// Filesets is inlined by code, see mcfgFromConfig
	Filesets map[string]*FilesetConfig
}

ModuleConfig contains the configuration file options for a module

type ModuleOverrides

type ModuleOverrides map[string]map[string]*common.Config // module -> fileset -> Config

func (*ModuleOverrides) Get

func (mo *ModuleOverrides) Get(module, fileset string) []*common.Config

Get returns an array of configuration overrides that should be merged in order.

type ModuleRegistry

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

func NewModuleRegistry

func NewModuleRegistry(moduleConfigs []*common.Config, beatVersion string) (*ModuleRegistry, error)

NewModuleRegistry reads and loads the configured module into the registry.

func (*ModuleRegistry) Empty

func (reg *ModuleRegistry) Empty() bool

func (*ModuleRegistry) GetProspectorConfigs

func (reg *ModuleRegistry) GetProspectorConfigs() ([]*common.Config, error)

func (*ModuleRegistry) LoadPipelines

func (reg *ModuleRegistry) LoadPipelines(esClient PipelineLoader) error

LoadPipelines loads the pipelines for each configured fileset.

type PipelineLoader

type PipelineLoader interface {
	LoadJSON(path string, json map[string]interface{}) ([]byte, error)
	Request(method, path string, pipeline string, params map[string]string, body interface{}) (int, []byte, error)
}

PipelineLoader is a subset of the Elasticsearch client API capable of loading the pipelines.

type ProcessorRequirement

type ProcessorRequirement struct {
	Name   string `config:"name"`
	Plugin string `config:"plugin"`
}

ProcessorRequirement represents the declaration of a dependency to a particular Ingest Node processor / plugin.

Jump to

Keyboard shortcuts

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