config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppModeProd            = "production"
	DefaultArgoCDNamespace = "argocd"
	DefaultServerPort      = "8080"
	ClusterCollectorName   = "Cluster"
)

Variables

View Source
var (
	AppMode         string
	ServerPort      string
	AppVersion      string
	ArgocdNamespace string
	Router          *gin.Engine
	KubeClient      *discovery.K8s

	LocalCluster = argoAppV1.Cluster{
		Name:            "in-cluster",
		Server:          argoAppV1.KubernetesInternalAPIServerAddr,
		ConnectionState: argoAppV1.ConnectionState{Status: argoAppV1.ConnectionStatusSuccessful},
	}
	InitLocalCluster           sync.Once
	ArgoManagedClusterSecrets  []v1.Secret
	ArgoManagedClusterNames    = sets.NewString()
	ArgoClusterNameToSecretMap = make(map[string]v1.Secret)
)

Functions

func InitializeEnvVar

func InitializeEnvVar()

func InitializeKubeClient added in v0.2.0

func InitializeKubeClient()

InitializeKubeClient initializing the kubeclient

func InitializeLogger

func InitializeLogger()

InitializeLogger will initialize the logger with certain format. Uses the environment variable to determine the mode of starting the logger and gin router. This can't be dynamically overridden.

func InitializeRouter

func InitializeRouter()

InitializeRouter initializing router

func Logger

func Logger(logger logrus.FieldLogger) gin.HandlerFunc

Logger injects the middleware function for the gin-gonic router. This enables the additional fields with user preferred log framework; logrus in this case.

Types

type DeprecationResults added in v0.2.0

type DeprecationResults struct {
	ClusterName string      `json:"clusterName"`
	Result      interface{} `json:"result"`
}

Jump to

Keyboard shortcuts

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