Documentation ¶
Index ¶
- Constants
- func AddCache(c *cache.Cache, k string, x interface{}) error
- func AddRootIndent(b []byte, n int) []byte
- func ContainsString(s []string, str string) bool
- func GetKeyValueMapFromQuotedString(quotedString string) map[string]string
- func NewCache() *cache.Cache
- func RandomString(n int) string
- func Split(str, before, after string) string
- func Truncate(num float64) float64
- func URLDecodeBase64(enconded string) string
- func UpdateCache(c *cache.Cache, k string, x interface{}) error
- func WriteHeaders(w *gin.ResponseWriter, statusCode int)
- type AgentScope
- type AgentType
- type Configurations
Constants ¶
View Source
const ( // AgentScopeCluster is the cluster scope AgentScopeCluster AgentScope = "cluster" // AgentScopeNamespace is the namespace scope AgentScopeNamespace AgentScope = "namespace" // AgentTypeInternal is the internal agent AgentTypeInternal AgentType = "internal" // AgentTypeExternal is the external agent AgentTypeExternal AgentType = "external" )
Variables ¶
This section is empty.
Functions ¶
func AddRootIndent ¶
func ContainsString ¶
ContainsString checks if a string is present in an array of strings
func GetKeyValueMapFromQuotedString ¶
GetKeyValueMapFromQuotedString returns key value pairs from a string with quotes
func NewCache ¶
func NewCache() *cache.Cache
NewCache initializes a new cache with a given expiration period and cleanup interval
func RandomString ¶
RandomString generates random strings, can be used to create ids or random secrets
func URLDecodeBase64 ¶
URLDecodeBase64 decader String of type base64 or return the text if error happens
func UpdateCache ¶
UpdateCache function takes a string and an object to be cached
func WriteHeaders ¶
func WriteHeaders(w *gin.ResponseWriter, statusCode int)
WriteHeaders adds important headers to API responses
Types ¶
type Configurations ¶
type Configurations struct { Version string `required:"true"` AgentDeployments string `required:"true" split_words:"true"` DbServer string `required:"true" split_words:"true"` JwtSecret string `required:"true" split_words:"true"` SelfAgent string `required:"true" split_words:"true"` AgentScope string `required:"true" split_words:"true"` AgentNamespace string `required:"true" split_words:"true"` LitmusPortalNamespace string `required:"true" split_words:"true"` DbUser string `required:"true" split_words:"true"` DbPassword string `required:"true" split_words:"true"` ChaosCenterScope string `required:"true" split_words:"true"` SubscriberImage string `required:"true" split_words:"true"` EventTrackerImage string `required:"true" split_words:"true"` ArgoWorkflowControllerImage string `required:"true" split_words:"true"` ArgoWorkflowExecutorImage string `required:"true" split_words:"true"` LitmusChaosOperatorImage string `required:"true" split_words:"true"` LitmusChaosRunnerImage string `required:"true" split_words:"true"` LitmusChaosExporterImage string `required:"true" split_words:"true"` LitmusChaosServerLogFormat string `split_words:"true" default:"text"` ContainerRuntimeExecutor string `required:"true" split_words:"true"` HubBranchName string `required:"true" split_words:"true"` WorkflowHelperImageVersion string `required:"true" split_words:"true"` ServerServiceName string `split_words:"true"` NodeName string `split_words:"true"` Ingress string `split_words:"true"` IngressName string `split_words:"true"` ChaosCenterUiEndpoint string `split_words:"true"` TlsCertB64 string `split_words:"true"` TlsSecretName string `split_words:"true"` LitmusAuthGrpcEndpoint string `split_words:"true" default:"localhost"` LitmusAuthGrpcPort string `split_words:"true" default:":3030"` KubeConfigFilePath string `split_words:"true"` RemoteHubMaxSize string `split_words:"true"` SkipSslVerify string `split_words:"true"` SelfAgentNodeSelector string `split_words:"true"` SelfAgentTolerations string `split_words:"true"` HttpPort string `split_words:"true" default:"8080"` RpcPort string `split_words:"true" default:"8000"` }
var Config Configurations
Click to show internal directories.
Click to hide internal directories.