scanner

package
v0.0.0-...-da3e774 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Speed    = "speed"
	EnvSpeed = "MINIO_SCANNER_SPEED"

	IdleSpeed    = "idle_speed"
	EnvIdleSpeed = "MINIO_SCANNER_IDLE_SPEED"

	ExcessVersions    = "alert_excess_versions"
	EnvExcessVersions = "MINIO_SCANNER_ALERT_EXCESS_VERSIONS"

	ExcessFolders    = "alert_excess_folders"
	EnvExcessFolders = "MINIO_SCANNER_ALERT_EXCESS_FOLDERS"

	// All below are deprecated in October 2022 and
	// replaced them with a single speed parameter
	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:   Speed,
		Value: "default",
	},
	config.KV{
		Key:           IdleSpeed,
		Value:         "",
		HiddenIfEmpty: true,
	},
	config.KV{
		Key:   ExcessVersions,
		Value: "100",
	},
	config.KV{
		Key:   ExcessFolders,
		Value: "50000",
	},

	config.KV{
		Key:           Delay,
		Value:         "",
		HiddenIfEmpty: true,
	},

	config.KV{
		Key:           MaxWait,
		Value:         "",
		HiddenIfEmpty: true,
	},

	config.KV{
		Key:           Cycle,
		Value:         "",
		HiddenIfEmpty: true,
	},
}

DefaultKVS - default KV config for heal settings

View Source
var (

	// Help provides help for config values
	Help = config.HelpKVS{
		config.HelpKV{
			Key:         Speed,
			Description: `customize scanner speed (default|slowest|slow|fast|fastest)` + defaultHelpPostfix(Speed),
			Optional:    true,
			Type:        "string",
		},
		config.HelpKV{
			Key:         ExcessVersions,
			Description: `alert per object beyond this many versions` + defaultHelpPostfix(ExcessVersions),
			Optional:    true,
			Type:        "int",
		},
		config.HelpKV{
			Key:         ExcessFolders,
			Description: `alert beyond this many sub-folders per folder in an erasure set` + defaultHelpPostfix(ExcessFolders),
			Optional:    true,
			Type:        "int",
		},
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// Delay is the sleep multiplier.
	Delay float64 `json:"delay"`

	// Sleep always or based on incoming S3 requests.
	IdleMode int32 // 0 => on, 1 => off

	// Alert upon this many excess object versions
	ExcessVersions int64 // 100

	// Alert upon this many excess sub-folders per folder in an erasure set.
	ExcessFolders int64 // 50000

	// 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