Documentation
¶
Index ¶
- Constants
- func ArgumentsToValues(arguments map[string]any) url.Values
- func BuildPluginURL(namespace, service string, port int, isOpenShift bool) string
- func DefaultPluginURL(isOpenShift bool) string
- func PrepareQueryArguments(arguments map[string]any) map[string]any
- type Config
- type GetResponse
- type NetObserv
Constants ¶
const ( DefaultPluginNamespace = "netobserv" DefaultPluginService = "netobserv-plugin" DefaultPluginPort = 9001 // DefaultPluginHTTPTimeout bounds waits for the console plugin HTTP API (Loki/Prometheus work behind it). DefaultPluginHTTPTimeout = 120 * time.Second )
Defaults match netobserv-operator (PluginName, DefaultOperatorNamespace, advanced.port).
const DefaultPluginServiceCAPath = "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
DefaultPluginServiceCAPath is the OpenShift-projected service-serving CA bundle.
Variables ¶
This section is empty.
Functions ¶
func ArgumentsToValues ¶
ArgumentsToValues converts prepared MCP tool arguments into URL query values.
func BuildPluginURL ¶
BuildPluginURL builds a URL for the console plugin backend Service.
func DefaultPluginURL ¶
DefaultPluginURL returns the in-cluster Service URL using HTTPS on OpenShift and HTTP otherwise.
Types ¶
type Config ¶
type Config struct {
// Url overrides the plugin base URL. When empty, built from namespace, service, and port.
Url string `toml:"url,omitempty"`
Namespace string `toml:"namespace,omitempty"`
Service string `toml:"service,omitempty"`
Port int `toml:"port,omitempty"`
Insecure bool `toml:"insecure,omitempty"`
CertificateAuthority string `toml:"certificate_authority,omitempty"`
}
Config holds NetObserv console plugin backend configuration.
func (*Config) ResolvedURL ¶
ResolvedURL returns the plugin base URL, applying operator-aligned defaults when url is unset.
type GetResponse ¶
GetResponse is the result of a plugin HTTP GET call.
type NetObserv ¶
type NetObserv struct {
// contains filtered or unexported fields
}
NetObserv is an HTTP client for the NetObserv console plugin backend API.
func NewNetObserv ¶
func NewNetObserv(configProvider api.BaseConfig, k8s api.KubernetesClient) *NetObserv
NewNetObserv creates a client using toolset config, cluster detection, and the Kubernetes REST config.