logs

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ServerPrompt = `` /* 439-byte string literal not displayed */
View Source
const ToolsetName = "observability/logs"

Variables

View Source
var DefaultConfig = &Config{}

Functions

This section is empty.

Types

type Config

type Config struct {
	// AuthMode controls where the bearer token is obtained for authenticating against Loki endpoints.
	// Valid values: "header" (default), "kubeconfig".
	AuthMode auth.AuthMode `toml:"auth_mode,omitempty"`

	// LokiURL is the URL of the Loki API endpoint.
	LokiURL string `toml:"loki_url,omitempty"`

	// Insecure controls whether to skip TLS certificate verification.
	Insecure bool `toml:"insecure,omitempty"`

	// UseRoute controls whether to use OpenShift Routes for discovering LokiStack endpoints.
	UseRoute bool `toml:"use_route,omitempty"`
}

func GetConfig

func GetConfig(params api.ToolHandlerParams) *Config

func (*Config) GetAuthMode

func (c *Config) GetAuthMode() auth.AuthMode

func (*Config) Validate

func (c *Config) Validate() error

type LabelNamesOutput

type LabelNamesOutput struct {
	Labels []string `json:"labels"`
}

type LabelValuesOutput

type LabelValuesOutput struct {
	Values []string `json:"values"`
}

type ListInstancesOutput

type ListInstancesOutput struct {
	Instances []LokiInstance `json:"instances"`
}

type LokiInstance

type LokiInstance struct {
	LokiNamespace string `json:"lokiNamespace"`
	LokiName      string `json:"lokiName"`
	Status        string `json:"status"`
	URL           string `json:"url"`
}

type QueryRangeOutput

type QueryRangeOutput struct {
	ResultType string        `json:"resultType"`
	Streams    []loki.Stream `json:"streams"`
}

type Toolset

type Toolset struct{}

Toolset implements the observability toolset for Loki.

func (*Toolset) GetDescription

func (t *Toolset) GetDescription() string

func (*Toolset) GetName

func (t *Toolset) GetName() string

func (*Toolset) GetPrompts

func (t *Toolset) GetPrompts() []api.ServerPrompt

func (*Toolset) GetResourceTemplates

func (t *Toolset) GetResourceTemplates() []api.ServerResourceTemplate

func (*Toolset) GetResources

func (t *Toolset) GetResources() []api.ServerResource

func (*Toolset) GetTools

func (t *Toolset) GetTools(_ api.FilteringProvider) []api.ServerTool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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