Documentation
¶
Overview ¶
Package configmanager provides centralized configuration management using Viper. This file contains the interfaces for configuration management.
Index ¶
- func GetClusterName(config any) (string, error)
- type ConfigManager
- type MockConfigManager
- type MockConfigManager_Expecter
- type MockConfigManager_GetConfig_Call
- func (_c *MockConfigManager_GetConfig_Call[T]) Return(v *T) *MockConfigManager_GetConfig_Call[T]
- func (_c *MockConfigManager_GetConfig_Call[T]) Run(run func()) *MockConfigManager_GetConfig_Call[T]
- func (_c *MockConfigManager_GetConfig_Call[T]) RunAndReturn(run func() *T) *MockConfigManager_GetConfig_Call[T]
- type MockConfigManager_LoadConfig_Call
- func (_c *MockConfigManager_LoadConfig_Call[T]) Return(err error) *MockConfigManager_LoadConfig_Call[T]
- func (_c *MockConfigManager_LoadConfig_Call[T]) Run(run func(tmr timer.Timer)) *MockConfigManager_LoadConfig_Call[T]
- func (_c *MockConfigManager_LoadConfig_Call[T]) RunAndReturn(run func(tmr timer.Timer) error) *MockConfigManager_LoadConfig_Call[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClusterName ¶
GetClusterName extracts the cluster name from supported Kind or K3d config structures.
Types ¶
type ConfigManager ¶
type ConfigManager[T any] interface { // LoadConfig loads the configuration from files and environment variables. // Returns the previously loaded config if already loaded. // If timer is provided, timing information will be included in the success notification. LoadConfig(tmr timer.Timer) error // GetConfig returns the currently loaded configuration. // If the configuration has not been loaded yet, it returns nil. GetConfig() *T }
ConfigManager provides configuration management functionality.
type MockConfigManager ¶
MockConfigManager is an autogenerated mock type for the ConfigManager type
func NewMockConfigManager ¶
func NewMockConfigManager[T any](t interface { mock.TestingT Cleanup(func()) }) *MockConfigManager[T]
NewMockConfigManager creates a new instance of MockConfigManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockConfigManager[T]) EXPECT ¶
func (_m *MockConfigManager[T]) EXPECT() *MockConfigManager_Expecter[T]
func (*MockConfigManager[T]) GetConfig ¶
func (_mock *MockConfigManager[T]) GetConfig() *T
GetConfig provides a mock function for the type MockConfigManager
func (*MockConfigManager[T]) LoadConfig ¶
func (_mock *MockConfigManager[T]) LoadConfig(tmr timer.Timer) error
LoadConfig provides a mock function for the type MockConfigManager
type MockConfigManager_Expecter ¶
type MockConfigManager_Expecter[T any] struct { // contains filtered or unexported fields }
func (*MockConfigManager_Expecter[T]) GetConfig ¶
func (_e *MockConfigManager_Expecter[T]) GetConfig() *MockConfigManager_GetConfig_Call[T]
GetConfig is a helper method to define mock.On call
func (*MockConfigManager_Expecter[T]) LoadConfig ¶
func (_e *MockConfigManager_Expecter[T]) LoadConfig(tmr interface{}) *MockConfigManager_LoadConfig_Call[T]
LoadConfig is a helper method to define mock.On call
- tmr timer.Timer
type MockConfigManager_GetConfig_Call ¶
MockConfigManager_GetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfig'
func (*MockConfigManager_GetConfig_Call[T]) Return ¶
func (_c *MockConfigManager_GetConfig_Call[T]) Return(v *T) *MockConfigManager_GetConfig_Call[T]
func (*MockConfigManager_GetConfig_Call[T]) Run ¶
func (_c *MockConfigManager_GetConfig_Call[T]) Run(run func()) *MockConfigManager_GetConfig_Call[T]
func (*MockConfigManager_GetConfig_Call[T]) RunAndReturn ¶
func (_c *MockConfigManager_GetConfig_Call[T]) RunAndReturn(run func() *T) *MockConfigManager_GetConfig_Call[T]
type MockConfigManager_LoadConfig_Call ¶
MockConfigManager_LoadConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadConfig'
func (*MockConfigManager_LoadConfig_Call[T]) Return ¶
func (_c *MockConfigManager_LoadConfig_Call[T]) Return(err error) *MockConfigManager_LoadConfig_Call[T]
func (*MockConfigManager_LoadConfig_Call[T]) Run ¶
func (_c *MockConfigManager_LoadConfig_Call[T]) Run(run func(tmr timer.Timer)) *MockConfigManager_LoadConfig_Call[T]
func (*MockConfigManager_LoadConfig_Call[T]) RunAndReturn ¶
func (_c *MockConfigManager_LoadConfig_Call[T]) RunAndReturn(run func(tmr timer.Timer) error) *MockConfigManager_LoadConfig_Call[T]
Directories
¶
| Path | Synopsis |
|---|---|
|
Package helpers provides common functionality for config managers to eliminate duplication.
|
Package helpers provides common functionality for config managers to eliminate duplication. |
|
Package k3d provides configuration management for K3d v1alpha5.SimpleConfig configurations.
|
Package k3d provides configuration management for K3d v1alpha5.SimpleConfig configurations. |
|
Package kind provides configuration management for Kind cluster configurations.
|
Package kind provides configuration management for Kind cluster configurations. |
|
Package configmanager provides configuration management for KSail v1alpha1.Cluster configurations.
|
Package configmanager provides configuration management for KSail v1alpha1.Cluster configurations. |
|
Package testutils provides common test utilities for config manager testing.
|
Package testutils provides common test utilities for config manager testing. |