knowledge

package
v0.1.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 7 Imported by: 0

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 Knowledge

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

KnowledgeClient provides access to knowledge about OpenTelemetry components

func NewKnowledge

func NewKnowledge(storage storage.Storage, logger logger.Logger) *Knowledge

NewKnowledgeClient creates a new knowledge client

func (*Knowledge) Close

func (kc *Knowledge) Close() error

Close closes the underlying storage connection

func (*Knowledge) GetComponentByName

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

GetComponentByName returns a component by name

func (*Knowledge) GetComponentPackage

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

GetComponentPackage returns the package name for a specific component

func (*Knowledge) GetComponentsByLanguage

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

GetComponentsByLanguage returns components for a specific language with pagination

func (*Knowledge) GetComponentsByType

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

GetComponentsByType returns components of a specific type with pagination

func (*Knowledge) GetCorePackages

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

GetCorePackages returns core packages for a language

func (*Knowledge) GetInstrumentationPackage

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

GetInstrumentationPackage returns the package name for a specific instrumentation

func (*Knowledge) GetMainSDKs

func (kc *Knowledge) GetMainSDKs(language string) ([]providers.CorePackage, error)

GetMainSDKs returns all main SDK packages for the given language

func (*Knowledge) GetPackageType

func (kc *Knowledge) GetPackageType(language, packageName string) (string, error)

GetPackageType returns the type of a package for the given language

func (*Knowledge) GetPrerequisites

func (kc *Knowledge) 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 (*Knowledge) IsCorePackage

func (kc *Knowledge) IsCorePackage(language, packageName string) bool

IsCorePackage checks if a package is a core OpenTelemetry package

func (*Knowledge) IsMainSDK

func (kc *Knowledge) IsMainSDK(language, packageName string) bool

IsMainSDK checks if a package is a main SDK package for the given language

func (*Knowledge) QueryComponents

func (kc *Knowledge) 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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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