cfg

package
v0.0.0-...-4867541 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSafeWriteOptions

func GetSafeWriteOptions() (wOptions *mprpc.WriteOptions)

getSafeWriteOptions returns a strictly consistency write options

Relevant documentation:

merge fsync and J: https://jira.mongodb.org/browse/SERVER-11399

func GetTurboWriteOptions

func GetTurboWriteOptions() (wOptions *mprpc.WriteOptions)

getTurboWriteOptions returns a eventual consistency write options

Relevant documentation:

merge fsync and J: https://jira.mongodb.org/browse/SERVER-11399

Types

type Amplifier

type Amplifier *AmplifyOptions

AmplifyOptions

type AmplifyOptions

type AmplifyOptions struct {
	Connections  uint          `long:"connections" default:"1" description:"request connections for amp"`
	Concurrency  uint          `long:"concurrency" default:"5" description:"request concurrency for amp"`
	TotalRequest uint          `long:"requests" default:"20" description:"total perf requests sent for amp"`
	QPS          uint          `long:"qps" description:"qps used for amp"`
	Timeout      time.Duration `long:"timeout" description:"timeout for amp request to backend"`
	CPUs         uint          `long:"cpu" default:"1" description:"cpus used for amp"`
}

AmplifyOptions for amp

func Amplifer

func Amplifer(options AmplifyOptions) *AmplifyOptions

Get AmplifyOptions based on given param

func MicroAmplifier

func MicroAmplifier() (amplifier *AmplifyOptions)

MicroAmplifier generate AmplifyOptions for light weight workload

func StressAmplifier

func StressAmplifier() (amplifier *AmplifyOptions)

StressAmplifier generate AmplifyOptions for stress workload

type Config

type Config struct {
	ProxyConfig
	AmplifyOptions
	ServerPort int  `long:"server-port" default:"50053" description:" api server port"`
	Turbo      bool `long:"turbo" description:"enable turbo mode"`
}

Server Config

type ProxyConfig

type ProxyConfig struct {
	ProxyAddr    string `long:"proxy-addr" default:"127.0.0.1" description:"storage address"`
	ProxyPort    int    `long:"proxy-port" default:"50051" description:"storage port"`
	Secure       bool   `long:"https" description:"use tls to connect proxy backend"`
	RpcTimeout   int64  `long:"rpc-timeout" default:"25000" description:"storage request timeout"`
	BatchSize    int64  `short:"b" long:"batch" default:"10000" description:"batch size"`
	ReadPref     int32  `short:"r" long:"read-pref" default:"2" description:"read preference"`
	AllowPartial bool   `long:"partial" description:"allow partial"`
}

Proxy client cfg

func DefaultConfig

func DefaultConfig() (config *ProxyConfig)

Create default cfg

Jump to

Keyboard shortcuts

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