api

package
v0.1.0-cvefix.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvAPIRequestsMax             = "MINIO_API_REQUESTS_MAX"
	EnvAPIRequestsDeadline        = "MINIO_API_REQUESTS_DEADLINE"
	EnvAPIClusterDeadline         = "MINIO_API_CLUSTER_DEADLINE"
	EnvAPICorsAllowOrigin         = "MINIO_API_CORS_ALLOW_ORIGIN"
	EnvAPIRemoteTransportDeadline = "MINIO_API_REMOTE_TRANSPORT_DEADLINE"
	EnvAPIListQuorum              = "MINIO_API_LIST_QUORUM"
	EnvAPIExtendListCacheLife     = "MINIO_API_EXTEND_LIST_CACHE_LIFE"
	EnvAPISecureCiphers           = "MINIO_API_SECURE_CIPHERS"
)

API sub-system constants

View Source
const (
	EnvAPIReadyDeadline = "MINIO_API_READY_DEADLINE"
)

Deprecated key and ENVs

Variables

View Source
var (
	DefaultKVS = config.KVS{
		config.KV{
			Key:   apiRequestsMax,
			Value: "0",
		},
		config.KV{
			Key:   apiRequestsDeadline,
			Value: "10s",
		},
		config.KV{
			Key:   apiClusterDeadline,
			Value: "10s",
		},
		config.KV{
			Key:   apiCorsAllowOrigin,
			Value: "*",
		},
		config.KV{
			Key:   apiRemoteTransportDeadline,
			Value: "2h",
		},
		config.KV{
			Key:   apiListQuorum,
			Value: "optimal",
		},
		config.KV{
			Key:   apiExtendListCacheLife,
			Value: "0s",
		},
	}
)

DefaultKVS - default storage class config

View Source
var (
	Help = config.HelpKVS{
		config.HelpKV{
			Key:         apiRequestsMax,
			Description: `set the maximum number of concurrent requests, e.g. "1600"`,
			Optional:    true,
			Type:        "number",
		},
		config.HelpKV{
			Key:         apiRequestsDeadline,
			Description: `set the deadline for API requests waiting to be processed e.g. "1m"`,
			Optional:    true,
			Type:        "duration",
		},
		config.HelpKV{
			Key:         apiCorsAllowOrigin,
			Description: `set comma separated list of origins allowed for CORS requests e.g. "https://example1.com,https://example2.com"`,
			Optional:    true,
			Type:        "csv",
		},
		config.HelpKV{
			Key:         apiRemoteTransportDeadline,
			Description: `set the deadline for API requests on remote transports while proxying between federated instances e.g. "2h"`,
			Optional:    true,
			Type:        "duration",
		},
	}
)

Help template for storageclass feature.

Functions

This section is empty.

Types

type Config

type Config struct {
	RequestsMax             int           `json:"requests_max"`
	RequestsDeadline        time.Duration `json:"requests_deadline"`
	ClusterDeadline         time.Duration `json:"cluster_deadline"`
	CorsAllowOrigin         []string      `json:"cors_allow_origin"`
	RemoteTransportDeadline time.Duration `json:"remote_transport_deadline"`
	ListQuorum              string        `json:"list_strict_quorum"`
	ExtendListLife          time.Duration `json:"extend_list_cache_life"`
}

Config storage class configuration

func LookupConfig

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

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

func (Config) GetListQuorum

func (sCfg Config) GetListQuorum() int

GetListQuorum interprets list quorum values and returns appropriate acceptable quorum expected for list operations

func (*Config) UnmarshalJSON

func (sCfg *Config) UnmarshalJSON(data []byte) error

UnmarshalJSON - Validate SS and RRS parity when unmarshalling JSON.

Jump to

Keyboard shortcuts

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