datahub

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package datahub provides a DataHub toolkit adapter for the MCP data platform.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationConfig added in v0.20.0

type AnnotationConfig struct {
	ReadOnlyHint    *bool `yaml:"read_only_hint"`
	DestructiveHint *bool `yaml:"destructive_hint"`
	IdempotentHint  *bool `yaml:"idempotent_hint"`
	OpenWorldHint   *bool `yaml:"open_world_hint"`
}

AnnotationConfig holds tool annotation overrides from configuration.

type Config

type Config struct {
	URL             string                      `yaml:"url"`
	Token           string                      `yaml:"token"`
	Timeout         time.Duration               `yaml:"timeout"`
	DefaultLimit    int                         `yaml:"default_limit"`
	MaxLimit        int                         `yaml:"max_limit"`
	MaxLineageDepth int                         `yaml:"max_lineage_depth"`
	ConnectionName  string                      `yaml:"connection_name"`
	Debug           bool                        `yaml:"debug"` // Enable debug logging
	Descriptions    map[string]string           `yaml:"descriptions"`
	Annotations     map[string]AnnotationConfig `yaml:"annotations"`
}

Config holds DataHub toolkit configuration.

func ParseConfig

func ParseConfig(cfg map[string]any) (Config, error)

ParseConfig parses a DataHub toolkit configuration from a map.

type Toolkit

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

Toolkit wraps mcp-datahub toolkit for the platform.

func New

func New(name string, cfg Config) (*Toolkit, error)

New creates a new DataHub toolkit.

func (*Toolkit) Client

func (t *Toolkit) Client() *dhclient.Client

Client returns the underlying DataHub client for direct use.

func (*Toolkit) Close

func (t *Toolkit) Close() error

Close releases resources.

func (*Toolkit) Config

func (t *Toolkit) Config() Config

Config returns the toolkit configuration.

func (*Toolkit) Connection added in v0.12.1

func (t *Toolkit) Connection() string

Connection returns the connection name for audit logging.

func (*Toolkit) Kind

func (*Toolkit) Kind() string

Kind returns the toolkit kind.

func (*Toolkit) Name

func (t *Toolkit) Name() string

Name returns the toolkit instance name.

func (*Toolkit) RegisterTools

func (t *Toolkit) RegisterTools(s *mcp.Server)

RegisterTools registers DataHub tools with the MCP server. The platform provides a unified list_connections tool, so the per-toolkit datahub_list_connections is excluded.

func (*Toolkit) SetQueryProvider

func (t *Toolkit) SetQueryProvider(provider query.Provider)

SetQueryProvider sets the query execution provider for enrichment.

func (*Toolkit) SetSemanticProvider

func (t *Toolkit) SetSemanticProvider(provider semantic.Provider)

SetSemanticProvider sets the semantic metadata provider for enrichment.

func (*Toolkit) Tools

func (*Toolkit) Tools() []string

Tools returns the list of tool names that would be provided by this toolkit.

Jump to

Keyboard shortcuts

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