config

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 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"`
	ResourceMaxQuota int         `json:"resourceMaxQuota" pflag:",Global limit for concurrent Qubole queries"`
	RedisConfig      RedisConfig `json:"redis" pflag:",Config for Redist 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 {
	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

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