config

package
v0.0.57 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 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"`
	Service             string             `json:"service" yaml:"service"`
	Operation           string             `json:"operation" yaml:"operation"`
	Dataset             string             `json:"dataset" yaml:"dataset"`
	Concurrency         int                `json:"concurrency" yaml:"concurrency"`
	BatchSize           int                `json:"batch_size" yaml:"batch_size"`
	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 operation type of implemented load test.

const (
	UnknownOperation Operation = iota
	Insert
	StreamInsert
	Search
	StreamSearch
)

Operation method definition.

func OperationMethod added in v0.0.39

func OperationMethod(s string) Operation

OperationMethod converts string to Operation.

func (Operation) String added in v0.0.39

func (o Operation) String() string

String converts Operation to string.

type Service added in v0.0.51

type Service uint8

Service is service type of implemented load test.

const (
	UnknownService Service = iota
	Agent
	Gateway
)

Service definitions.

func ServiceMethod added in v0.0.51

func ServiceMethod(s string) Service

ServiceMethod converts string to Service.

func (Service) String added in v0.0.51

func (s Service) String() string

String converts Service to string.

Jump to

Keyboard shortcuts

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