Documentation
¶
Overview ¶
Package configutil provides utilities for working with configuration files in the opampctl tool.
Index ¶
- func GetCurrentCacheDir(config *config.GlobalConfig) string
- func GetCurrentCluster(config *config.GlobalConfig) *config.Cluster
- func GetCurrentContext(config *config.GlobalConfig) *config.Context
- func GetCurrentOpAMPCommanderEndpoint(config *config.GlobalConfig) string
- func GetCurrentUser(config *config.GlobalConfig) *config.User
- func NewLogger(*config.GlobalConfig) *slog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentCacheDir ¶
func GetCurrentCacheDir(config *config.GlobalConfig) string
GetCurrentCacheDir retrieves the current cacheDir based on the current user from the global configuration.
func GetCurrentCluster ¶
func GetCurrentCluster(config *config.GlobalConfig) *config.Cluster
GetCurrentCluster retrieves the current cluster based on the current context from the global configuration.
func GetCurrentContext ¶
func GetCurrentContext(config *config.GlobalConfig) *config.Context
GetCurrentContext retrieves the current context from the global configuration.
func GetCurrentOpAMPCommanderEndpoint ¶
func GetCurrentOpAMPCommanderEndpoint(config *config.GlobalConfig) string
GetCurrentOpAMPCommanderEndpoint retrieves the OpAMP Commander endpoint for the current cluster from the global configuration.
func GetCurrentUser ¶
func GetCurrentUser(config *config.GlobalConfig) *config.User
GetCurrentUser retrieves the current user based on the current context from the global configuration.
func NewLogger ¶
func NewLogger(*config.GlobalConfig) *slog.Logger
NewLogger creates a new logger for the opampctl tool. It uses the default slog logger. In future, improve a logger: https://github.com/minuk-dev/opampcommander/issues/53
Types ¶
This section is empty.