config

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(cfg *Config) error

Types

type Config

type Config struct {
	Type             Type        `json:"type" pflag:"noop, Which resource manager to use, redis or noop. Default is noop."`
	ResourceMaxQuota int         `json:"resourceMaxQuota" pflag:",Global limit for concurrent Qubole queries"`
	RedisConfig      RedisConfig `json:"redis" pflag:",Config for Redis resourcemanager."`
}

Configs for Resource Manager

func GetConfig

func GetConfig() *Config

Retrieves the current config value or default.

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

type RedisConfig

type RedisConfig struct {
	HostPaths   []string `json:"hostPaths" pflag:",Redis hosts locations."`
	PrimaryName string   `json:"primaryName" pflag:",Redis primary name, fill in only if you are connecting to a redis sentinel cluster."`
	// deprecated: Please use HostPaths instead
	HostPath   string `json:"hostPath" pflag:",Redis host location"`
	HostKey    string `json:"hostKey" pflag:",Key for local Redis access"`
	MaxRetries int    `json:"maxRetries" pflag:",See Redis client options for more info"`
}

Specific configs for Redis resource manager Ref: https://redis.io/topics/sentinel for information on how to fill in these fields.

type Type

type Type = string
const (
	TypeNoop  Type = "noop"
	TypeRedis Type = "redis"
)

Jump to

Keyboard shortcuts

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