config

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package setting stores all server application settings

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	config.GlobalConfig `json:",inline" yaml:",inline"`
	Addr                string             `json:"addr" yaml:"addr"`
	Method              string             `json:"method" yaml:"method"`
	Dataset             string             `json:"dataset" yaml:"dataset"`
	Concurrency         int                `json:"concurrency" yaml:"concurrency"`
	ProgressDuration    string             `json:"progress_duration" yaml:"progress_duration"`
	Client              *config.GRPCClient `json:"client" yaml:"client"`
}

Data represent a application setting data content (config.yaml). In K8s environment, this configuration is stored in K8s ConfigMap.

func NewConfig

func NewConfig(path string) (cfg *Data, err error)

NewConfig returns loaded configuration from file.

type GlobalConfig

type GlobalConfig = config.GlobalConfig

GlobalConfig is type alias of config.GlobalConfig.

type Operation added in v0.0.39

type Operation uint8

Operation is type of implemented load test.

const (
	Unknown Operation = iota
	Insert
	Search
)

Operation method.

func OperationMethod added in v0.0.39

func OperationMethod(s string) Operation

OperationMethod convert string to Operation.

func (Operation) String added in v0.0.39

func (o Operation) String() string

String convert Operation to string.

Jump to

Keyboard shortcuts

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