drive

package
v0.0.0-...-8ff70ea Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MaxTimeout is the max timeout for drive
	MaxTimeout = "max_timeout"
	// HelpDrive is help for drive
	HelpDrive = config.HelpKVS{
		config.HelpKV{
			Key:         MaxTimeout,
			Type:        "string",
			Description: "set per call max_timeout for the drive, defaults to 2 minutes",
			Optional:    true,
		},
	}
)
View Source
var DefaultKVS = config.KVS{
	config.KV{
		Key:   MaxTimeout,
		Value: "",
	},
}

DefaultKVS - default KVS for drive

Functions

This section is empty.

Types

type Config

type Config struct {
	// MaxTimeout - maximum timeout for a drive operation
	MaxTimeout time.Duration `json:"maxTimeout"`
}

Config represents the subnet related configuration

func LookupConfig

func LookupConfig(kvs config.KVS) (cfg Config, err error)

LookupConfig - lookup config and override with valid environment settings if any.

func (*Config) GetMaxTimeout

func (c *Config) GetMaxTimeout() time.Duration

GetMaxTimeout - returns the max timeout value.

func (*Config) Update

func (c *Config) Update(new Config) error

Update - updates the config with latest values

Jump to

Keyboard shortcuts

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