aiven

package
v0.0.0-...-d15ead3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound re-exports aiven.IsNotFound

func NewLoaderContext

func NewLoaderContext(ctx context.Context, projects Projects) context.Context

func UpsertPrometheusServiceIntegration

func UpsertPrometheusServiceIntegration(ctx context.Context, impersonator Impersonator, owner *unstructured.Unstructured, project Project, environmentName string) error

Types

type AivenClient

type AivenClient interface {
	ServiceGet(context.Context, string, string, ...[2]string) (*service.ServiceGetOut, error)
	ServiceMaintenanceStart(context.Context, string, string) error
	ProjectAlertsList(ctx context.Context, project string) ([]project.AlertOut, error)
}

func NewClient

func NewClient(aivenClient aiven.Client) AivenClient

type FakeAivenClient

type FakeAivenClient struct{}

func NewFakeAivenClient

func NewFakeAivenClient() *FakeAivenClient

func (*FakeAivenClient) ProjectAlertsList

func (f *FakeAivenClient) ProjectAlertsList(ctx context.Context, p string) ([]project.AlertOut, error)

ProjectAlertsList list active alerts for a project

func (*FakeAivenClient) ServiceGet

func (f *FakeAivenClient) ServiceGet(_ context.Context, _ string, serviceName string, _ ...[2]string) (*aiven.ServiceGetOut, error)

ServiceGet returns hardcoded example dataset

func (*FakeAivenClient) ServiceMaintenanceStart

func (f *FakeAivenClient) ServiceMaintenanceStart(_ context.Context, _ string, _ string) error

type Impersonator

type Impersonator interface {
	ImpersonatedClient(ctx context.Context, environmentName string, opts ...watcher.ImpersonatedClientOption) (dynamic.NamespaceableResourceInterface, error)
}

type Project

type Project struct {
	ID         string `json:"id"`
	VPC        string `json:"vpc"`
	EndpointID string `json:"endpoint_id"`
}

func GetProject

func GetProject(ctx context.Context, environmentName string) (Project, error)

type Projects

type Projects map[string]Project

func (*Projects) UnmarshalJSON

func (p *Projects) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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