api

package
v0.0.0-...-2ecbb9b Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultKVS = config.KVS{
		config.KV{
			Key:   apiRequestsMax,
			Value: "0",
		},
		config.KV{
			Key:   apiRequestsDeadline,
			Value: "10s",
		},
	}
)

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",
		},
	}
)

Help template for storageclass feature.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIRequestsMax      int           `json:"requests_max"`
	APIRequestsDeadline time.Duration `json:"requests_deadline"`
}

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