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 ¶
- type Module
- func (m *Module) ApplyDefaults()
- func (m *Module) DefaultEnabled() bool
- func (m *Module) Examples() map[string]types.ExampleCategory
- func (m *Module) Init(_ []byte) error
- func (m *Module) InitFromDiscovery(datasources []types.DatasourceInfo) error
- func (m *Module) Name() string
- func (m *Module) RegisterResources(log logrus.FieldLogger, reg module.ResourceRegistry) error
- func (m *Module) Start(_ context.Context) error
- func (m *Module) Stop(_ context.Context) error
- func (m *Module) Validate() error
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 (*Module) ApplyDefaults ¶
func (m *Module) ApplyDefaults()
ApplyDefaults is a no-op; packs are static content.
func (*Module) DefaultEnabled ¶
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 ¶
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) RegisterResources ¶
func (m *Module) RegisterResources(log logrus.FieldLogger, reg module.ResourceRegistry) error
RegisterResources registers the datasets://list and datasets://{name} resources.