engine

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Template Functions

query
    Executes its argument as a korrel8r query, returns []any.
    May return an error.

package engine implements generic correlation logic to correlate across domains.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder added in v0.6.2

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

Builder initializes the state of an engine. Engine returns the immutable engine instance.

func Build added in v0.6.2

func Build() *Builder

func (*Builder) Config added in v0.7.1

func (b *Builder) Config(configs config.Configs) *Builder

Config an engine.Builder.

func (*Builder) ConfigFile added in v0.7.0

func (b *Builder) ConfigFile(file string) *Builder

func (*Builder) Domains added in v0.6.2

func (b *Builder) Domains(domains ...korrel8r.Domain) *Builder

func (*Builder) Engine added in v0.6.2

func (b *Builder) Engine() (*Engine, error)

Engine returns the final engine, which can not be modified. The Builder is reset to the initial state returned by Build.

func (*Builder) Rules added in v0.6.2

func (b *Builder) Rules(rules ...korrel8r.Rule) *Builder

func (*Builder) StoreConfigs added in v0.6.2

func (b *Builder) StoreConfigs(storeConfigs ...config.Store) *Builder

func (*Builder) Stores added in v0.6.2

func (b *Builder) Stores(stores ...korrel8r.Store) *Builder

type Engine

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

Engine manages a set of rules and stores to perform correlation. Once created (see Build) an engine is immutable.

func (*Engine) Class

func (e *Engine) Class(fullname string) (korrel8r.Class, error)

Class parses a full class name and returns the

func (*Engine) ClassesFor added in v0.8.0

func (e *Engine) ClassesFor(d korrel8r.Domain) ([]korrel8r.Class, error)

ClassesFor collects classes from the domain or its stores.

func (*Engine) Domain

func (e *Engine) Domain(name string) (korrel8r.Domain, error)

func (*Engine) DomainClass

func (e *Engine) DomainClass(domain, class string) (korrel8r.Class, error)

func (*Engine) Domains

func (e *Engine) Domains() []korrel8r.Domain

func (*Engine) Get

func (e *Engine) Get(ctx context.Context, query korrel8r.Query, constraint *korrel8r.Constraint, result korrel8r.Appender) (err error)

Get results for query from all stores for the query domain.

func (*Engine) Graph

func (e *Engine) Graph() *graph.Graph

Graph creates a new graph of the engine's rules.

func (*Engine) NewTemplate added in v0.7.0

func (e *Engine) NewTemplate(name string) *template.Template

NewTemplate returns a template set up with options and funcs for this engine. See package documentation for more.

func (*Engine) Query added in v0.5.0

func (e *Engine) Query(query string) (korrel8r.Query, error)

Query parses a query string to a query object.

func (*Engine) Rule added in v0.6.2

func (e *Engine) Rule(name string) korrel8r.Rule

func (*Engine) Rules

func (e *Engine) Rules() []korrel8r.Rule

func (*Engine) StoreConfigsFor

func (e *Engine) StoreConfigsFor(d korrel8r.Domain) []config.Store

StoreConfigsFor returns the expanded store configurations and status.

func (*Engine) StoreFor added in v0.7.0

func (e *Engine) StoreFor(d korrel8r.Domain) korrel8r.Store

StoreFor returns the aggregated store for a domain, nil if the domain does not exist.

func (*Engine) StoresFor

func (e *Engine) StoresFor(d korrel8r.Domain) []korrel8r.Store

StoresFor returns the list of individual stores for a domain.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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