configutil

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package configutil provides utilities for working with configuration files in the opampctl tool.

Index

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.

Jump to

Keyboard shortcuts

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