fileset

package
v5.6.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2018 License: Apache-2.0 Imports: 15 Imported by: 352

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) GetMLConfigs

func (fs *Fileset) GetMLConfigs() []mlimporter.MLConfig

GetMLConfigs returns the list of machine-learning configurations declared by this fileset.

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) InfoString

func (reg *ModuleRegistry) InfoString() string

InfoString returns the enabled modules and filesets in a single string, ready to be shown to the user

func (*ModuleRegistry) LoadML

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

LoadML loads the machine-learning configurations into Elasticsearch, if Xpack is avaiable

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)
	GetVersion() string
}

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