client

package
v0.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentQuery

type ComponentQuery struct {
	Language     string
	Type         string
	Category     string
	Status       string
	SupportLevel string
	Name         string
	Framework    string // For instrumentation targets
	MinDate      time.Time
	MaxDate      time.Time
	Limit        int
	Offset       int
}

ComponentQuery represents a flexible query for components

type ComponentResult

type ComponentResult struct {
	Components []types.Component
	Total      int
	HasMore    bool
}

ComponentResult represents the result of a component query

type KnowledgeClient

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

KnowledgeClient provides a unified interface to the knowledge base It only loads data on-demand to keep memory usage low

func NewKnowledgeClient

func NewKnowledgeClient(dbPath string, logger logger.Logger) (*KnowledgeClient, error)

NewKnowledgeClient creates a new knowledge client

func (*KnowledgeClient) Close

func (kc *KnowledgeClient) Close() error

Close closes the underlying storage connection

func (*KnowledgeClient) GetComponentByName

func (kc *KnowledgeClient) GetComponentByName(name string) (*types.Component, error)

GetComponentByName returns a component by name

func (*KnowledgeClient) GetComponentPackage

func (kc *KnowledgeClient) GetComponentPackage(language, componentType, component string) (string, error)

GetComponentPackage returns the package name for a specific component

func (*KnowledgeClient) GetComponentsByLanguage

func (kc *KnowledgeClient) GetComponentsByLanguage(language string, limit, offset int) (*ComponentResult, error)

GetComponentsByLanguage returns components for a specific language with pagination

func (*KnowledgeClient) GetComponentsByType

func (kc *KnowledgeClient) GetComponentsByType(componentType string, limit, offset int) (*ComponentResult, error)

GetComponentsByType returns components of a specific type with pagination

func (*KnowledgeClient) GetCorePackages

func (kc *KnowledgeClient) GetCorePackages(language string) ([]string, error)

GetCorePackages returns core packages for a language

func (*KnowledgeClient) GetInstrumentationPackage

func (kc *KnowledgeClient) GetInstrumentationPackage(language, instrumentation string) (string, error)

GetInstrumentationPackage returns the package name for a specific instrumentation

func (*KnowledgeClient) GetPrerequisites

func (kc *KnowledgeClient) GetPrerequisites(language string) ([]PrerequisiteRule, error)

GetPrerequisites returns prerequisite rules for a language This is a simplified version - in practice, prerequisites would be derived from component metadata

func (*KnowledgeClient) QueryComponents

func (kc *KnowledgeClient) QueryComponents(query ComponentQuery) (*ComponentResult, error)

QueryComponents provides flexible querying with pagination

type PrerequisiteRule

type PrerequisiteRule struct {
	If       []string `json:"if"`
	Requires []string `json:"requires"`
	Unless   []string `json:"unless"`
}

PrerequisiteRule defines instrumentation prerequisites (legacy compatibility)

Jump to

Keyboard shortcuts

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