client

package
v0.72.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminCredentials

type AdminCredentials struct {
	Username string
	Password string
}

type DefaultGrafanaClientGenerator added in v0.34.0

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

DefaultGrafanaClientGenerator is the default implementation

func NewDefaultGrafanaClientGenerator added in v0.67.0

func NewDefaultGrafanaClientGenerator(cfg config.GrafanaConfig) *DefaultGrafanaClientGenerator

NewDefaultGrafanaClientGenerator creates a DefaultGrafanaClientGenerator with the given config.

func (*DefaultGrafanaClientGenerator) GenerateGrafanaClient added in v0.34.0

func (g *DefaultGrafanaClientGenerator) GenerateGrafanaClient(ctx context.Context, k8sClient client.Client, grafanaURL *url.URL) (GrafanaClient, error)

GenerateGrafanaClient creates a new Grafana client by fetching credentials and TLS configuration from Kubernetes secrets.

type GrafanaClient added in v0.34.0

type GrafanaClient interface {
	WithOrgID(orgID int64) GrafanaClient

	Datasources() datasources.ClientService
	Orgs() orgs.ClientService
	Dashboards() dashboards.ClientService
	Folders() folders.ClientService
	SsoSettings() sso_settings.ClientService
}

GrafanaClient exposes the Grafana HTTP API operations the operator uses.

WithOrgID returns a new client scoped to the given organization. The receiver is left untouched, so the same base client may be reused safely from concurrent goroutines.

func NewGrafanaClient added in v0.34.0

func NewGrafanaClient(api *grafana.GrafanaHTTPAPI) GrafanaClient

NewGrafanaClient creates a new GrafanaClient implementation wrapping the provided GrafanaHTTPAPI

type GrafanaClientGenerator added in v0.34.0

type GrafanaClientGenerator interface {
	GenerateGrafanaClient(ctx context.Context, k8sClient client.Client, grafanaURL *url.URL) (GrafanaClient, error)
}

GrafanaClientGenerator defines the interface for generating Grafana clients

type TLSConfig

type TLSConfig struct {
	Cert string
	Key  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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