datasets

package
v0.33.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package datasets ships dataset knowledge packs that describe how to query datasets stored in a generic transport (currently ClickHouse). A dataset is a named body of data (e.g. xatu-raw, xatu-cbt, otel-logs); its pack is content only — examples and getting-started guidance — and ships co-versioned with the release. The generic transport modules hold no dataset-specific knowledge.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

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

Module contributes dataset knowledge packs (examples + getting-started) to the registry. It owns no transport; the generic ClickHouse module executes the queries these packs describe. Packs are scoped to the datasets a deployment declares via proxy `contains`; when no deployment declares any, all packs are shown (back-compatible).

func New

func New() *Module

New creates a new datasets module.

func (*Module) ApplyDefaults

func (m *Module) ApplyDefaults()

ApplyDefaults is a no-op; packs are static content.

func (*Module) DefaultEnabled

func (m *Module) DefaultEnabled() bool

DefaultEnabled activates the module without configuration: packs ship with the release and are always available.

func (*Module) Examples

func (m *Module) Examples() map[string]types.ExampleCategory

Examples aggregates query examples across the active packs. Categories that appear in more than one pack (e.g. a category split across xatu-raw and xatu-cbt) are merged so no examples are dropped. Examples are never filtered against the live schema: a stale example fails loudly at query time where the agent can see and recover from it, whereas serve-time hiding is invisible and amplifies any discovery or parsing bug into silently missing guidance.

func (*Module) Init

func (m *Module) Init(_ []byte) error

Init loads the embedded packs. The module takes no configuration. With no proxy discovery, all packs are exposed.

func (*Module) InitFromDiscovery

func (m *Module) InitFromDiscovery(datasources []types.DatasourceInfo) error

InitFromDiscovery scopes the exposed packs to the datasets declared by discovered datasources (via their Contents bindings) and records where each dataset lives. Always returns nil: the packs ship with the release, so the module is always active. When no datasource declares any dataset, the active set stays empty and all packs are shown.

func (*Module) Name

func (m *Module) Name() string

func (*Module) RegisterResources

func (m *Module) RegisterResources(log logrus.FieldLogger, reg module.ResourceRegistry) error

RegisterResources registers the datasets://list and datasets://{name} resources.

func (*Module) Start

func (m *Module) Start(_ context.Context) error

Start is a no-op.

func (*Module) Stop

func (m *Module) Stop(_ context.Context) error

Stop is a no-op.

func (*Module) Validate

func (m *Module) Validate() error

Validate is a no-op; embedded packs are validated at load time.

Jump to

Keyboard shortcuts

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