client

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const StatusDeployed = common.StatusDeployed

StatusDeployed is exported for use in tests and provider

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultHelmFactory

type DefaultHelmFactory struct{}

DefaultHelmFactory creates real helm clients using kubernetes config

func (*DefaultHelmFactory) GetStatusRunner

func (f *DefaultHelmFactory) GetStatusRunner(kubeContext, namespace string, log *slog.Logger) (StatusRunner, error)

type HelmClientFactory

type HelmClientFactory interface {
	GetStatusRunner(kubeContext, namespace string, log *slog.Logger) (StatusRunner, error)
}

HelmClientFactory creates helm status runners

var ClientFactory HelmClientFactory = &DefaultHelmFactory{}

ClientFactory is the global factory - replaceable for testing

type MockHelmFactory

type MockHelmFactory struct {
	Runner StatusRunner
	Err    error
}

MockHelmFactory for testing - allows injecting mock status runners

func (*MockHelmFactory) GetStatusRunner

func (f *MockHelmFactory) GetStatusRunner(kubeContext, namespace string, log *slog.Logger) (StatusRunner, error)

type MockStatusRunner

type MockStatusRunner struct {
	Release *release.Release
	Err     error
}

MockStatusRunner for testing

func (*MockStatusRunner) Run

func (m *MockStatusRunner) Run(ctx context.Context, name string) (*release.Release, error)

type StatusRunner

type StatusRunner interface {
	Run(ctx context.Context, name string) (*release.Release, error)
}

StatusRunner abstracts the helm status action for testing

Jump to

Keyboard shortcuts

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