scanner

package
v0.0.0-...-fb0f190 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Delay   = "delay"
	MaxWait = "max_wait"
	Cycle   = "cycle"

	EnvDelay         = "MINIO_SCANNER_DELAY"
	EnvCycle         = "MINIO_SCANNER_CYCLE"
	EnvDelayLegacy   = "MINIO_CRAWLER_DELAY"
	EnvMaxWait       = "MINIO_SCANNER_MAX_WAIT"
	EnvMaxWaitLegacy = "MINIO_CRAWLER_MAX_WAIT"
)

Compression environment variables

Variables

View Source
var DefaultKVS = config.KVS{
	config.KV{
		Key:   Delay,
		Value: "2",
	},
	config.KV{
		Key:   MaxWait,
		Value: "5s",
	},
	config.KV{
		Key:   Cycle,
		Value: "1m",
	},
}

DefaultKVS - default KV config for heal settings

View Source
var (

	// Help provides help for config values
	Help = config.HelpKVS{
		config.HelpKV{
			Key:         Delay,
			Description: `scanner delay multiplier` + defaultHelpPostfix(Delay),
			Optional:    true,
			Type:        "float",
		},
		config.HelpKV{
			Key:         MaxWait,
			Description: `maximum wait time between operations` + defaultHelpPostfix(MaxWait),
			Optional:    true,
			Type:        "duration",
		},
		config.HelpKV{
			Key:         Cycle,
			Description: `time duration between scanner cycles` + defaultHelpPostfix(Cycle),
			Optional:    true,
			Type:        "duration",
		},
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// Delay is the sleep multiplier.
	Delay float64 `json:"delay"`
	// MaxWait is maximum wait time between operations
	MaxWait time.Duration
	// Cycle is the time.Duration between each scanner cycles
	Cycle time.Duration
}

Config represents the heal settings.

func LookupConfig

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

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

Jump to

Keyboard shortcuts

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