factory

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package factory constructs AWS-backed services used by CLI command packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddonService added in v0.7.0

func NewAddonService(awsCfg aws.Config, logger *slog.Logger) *addons.ServiceImpl

NewAddonService initializes an add-on service through the shared logger path, matching the cluster/nodegroup constructors. (REF-39)

func NewClusterService

func NewClusterService(awsCfg aws.Config, withHealth bool, logger *slog.Logger) *cluster.ServiceImpl

NewClusterService initializes a cluster service with optional health checking.

func NewDefaultLogger

func NewDefaultLogger(logger *slog.Logger) *slog.Logger

NewDefaultLogger returns logger unchanged if non-nil; otherwise returns a stderr text logger at the configured default level (see SetDefaultLogLevel). This is the single logger-construction path for the CLI.

func NewNodegroupService

func NewNodegroupService(awsCfg aws.Config, withHealth bool, logger *slog.Logger) *nodegroup.ServiceImpl

NewNodegroupService initializes a nodegroup service with optional health checking.

func NewNodegroupServiceWithHealth added in v0.7.0

func NewNodegroupServiceWithHealth(awsCfg aws.Config, k8sClient kubernetes.Interface, logger *slog.Logger) *nodegroup.ServiceImpl

NewNodegroupServiceWithHealth initializes a nodegroup service whose health checker is wired to the given Kubernetes client (which may be nil, in which case kube-dependent checks degrade gracefully). Use this when a command has resolved a --kubeconfig so workload/PDB checks run against the right cluster.

func ParseLogLevel added in v0.7.0

func ParseLogLevel(s string) slog.Level

ParseLogLevel maps a --log-level string to an slog.Level. Unknown values fall back to warn (the default quiet level). (REF-37)

func SetDefaultLogLevel added in v0.7.0

func SetDefaultLogLevel(level slog.Level)

SetDefaultLogLevel sets the level NewDefaultLogger uses for the shared logger. Call it once during startup; commands run single-threaded after that.

Types

This section is empty.

Jump to

Keyboard shortcuts

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