config

package
v0.0.0-...-aae080d Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGboxNamespace

func GetGboxNamespace() string

GetGboxNamespace returns the configured gbox namespace value

func GetServerPort

func GetServerPort() int

GetServerPort returns the configured server port

Types

type Config

type Config interface {
	// Initialize initializes the configuration
	Initialize(logger *log.Logger) error
}

Config is the interface that wraps the basic cluster configuration methods

func GetConfig

func GetConfig() (Config, error)

GetConfig returns the appropriate config based on cluster mode

func NewDockerConfig

func NewDockerConfig() Config

NewDockerConfig creates a new DockerConfig

func NewFileConfig

func NewFileConfig() Config

NewFileConfig creates a new FileConfig

func NewK8sConfig

func NewK8sConfig() Config

NewK8sConfig creates a new K8sConfig

type DockerConfig

type DockerConfig struct {
	Host string // Docker daemon socket/host
}

DockerConfig holds Docker-specific configuration

func (*DockerConfig) Initialize

func (c *DockerConfig) Initialize(logger *log.Logger) error

Initialize validates and initializes the configuration

type FileConfig

type FileConfig struct {
	ShareDir     string
	HostShareDir string
}

FileConfig handles file service configuration

func (*FileConfig) GetFileShareDir

func (c *FileConfig) GetFileShareDir() string

GetFileShareDir returns the share directory path

func (*FileConfig) GetHostShareDir

func (c *FileConfig) GetHostShareDir() string

GetHostShareDir returns the host share directory path

func (*FileConfig) Initialize

func (c *FileConfig) Initialize(logger *log.Logger) error

Initialize initializes the file configuration

type K8sConfig

type K8sConfig struct {
	KubeConfig string                // Path to kubeconfig file
	Config     *rest.Config          // Kubernetes REST config
	Client     *kubernetes.Clientset // Kubernetes client
}

K8sConfig holds Kubernetes-specific configuration

func (*K8sConfig) Initialize

func (c *K8sConfig) Initialize(logger *log.Logger) error

Initialize validates and initializes the configuration

Jump to

Keyboard shortcuts

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