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 ¶
- type Builder
- func (b *Builder) Config(configs config.Configs) *Builder
- func (b *Builder) ConfigFile(file string) *Builder
- func (b *Builder) Domains(domains ...korrel8r.Domain) *Builder
- func (b *Builder) Engine() (*Engine, error)
- func (b *Builder) Rules(rules ...korrel8r.Rule) *Builder
- func (b *Builder) StoreConfigs(storeConfigs ...config.Store) *Builder
- func (b *Builder) Stores(stores ...korrel8r.Store) *Builder
- type Engine
- func (e *Engine) Class(fullname string) (korrel8r.Class, error)
- func (e *Engine) ClassesFor(d korrel8r.Domain) ([]korrel8r.Class, error)
- func (e *Engine) Domain(name string) (korrel8r.Domain, error)
- func (e *Engine) DomainClass(domain, class string) (korrel8r.Class, error)
- func (e *Engine) Domains() []korrel8r.Domain
- func (e *Engine) Get(ctx context.Context, query korrel8r.Query, constraint *korrel8r.Constraint, ...) (err error)
- func (e *Engine) Graph() *graph.Graph
- func (e *Engine) NewTemplate(name string) *template.Template
- func (e *Engine) Query(query string) (korrel8r.Query, error)
- func (e *Engine) Rule(name string) korrel8r.Rule
- func (e *Engine) Rules() []korrel8r.Rule
- func (e *Engine) StoreConfigsFor(d korrel8r.Domain) []config.Store
- func (e *Engine) StoreFor(d korrel8r.Domain) korrel8r.Store
- func (e *Engine) StoresFor(d korrel8r.Domain) []korrel8r.Store
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 (*Builder) ConfigFile ¶ added in v0.7.0
func (*Builder) Engine ¶ added in v0.6.2
Engine returns the final engine, which can not be modified. The Builder is reset to the initial state returned by Build.
func (*Builder) StoreConfigs ¶ added in v0.6.2
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) ClassesFor ¶ added in v0.8.0
ClassesFor collects classes from the domain or its stores.
func (*Engine) DomainClass ¶
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) NewTemplate ¶ added in v0.7.0
NewTemplate returns a template set up with options and funcs for this engine. See package documentation for more.
func (*Engine) StoreConfigsFor ¶
StoreConfigsFor returns the expanded store configurations and status.