config

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSettings

type AppSettings struct {
	ExitAfter time.Duration `json:"exit-after"`

	// ######################## input #######################
	InputRAW []string `json:"input-raw"`

	// --- input-file-directory ---
	InputFileDir         []string `json:"input-file-directory"`
	InputFileReadDepth   int      `json:"input-file-read-depth"`
	InputFileReplaySpeed float64  `json:"input-file-replay-speed"`

	// intput RocketMQ
	InputRocketMQNameServer []string `json:"input-rocketmq-name-server"`
	InputRocketMQTopic      string   `json:"input-rocketmq-topic"`
	InputRocketMQAccessKey  string   `json:"input-rocketmq-access-key"`
	InputRocketMQSecretKey  string   `json:"input-rocketmq-secret-key"`
	InputRocketMQGroupName  string   `json:"input-rocketmq-group-name"`

	// ######################## output ########################
	OutputStdout bool     `json:"output-stdout"`
	OutputGRPC   []string `json:"output-grpc"`
	// multiple workers call services concurrently
	OutputGRPCWorkerNumber int `json:"output-grpc-worker-number"`

	// --- outputfile ---
	OutputFileDir []string `json:"output-file-directory"`
	// MaxSize is the maximum size in megabytes of the log file before it gets rotated.
	OutputFileMaxSize int `json:"output-file-max-size"`
	// MaxBackups is the maximum number of old log files to retain.
	OutputFileMaxBackups int `json:"output-file-max-backups"`
	// MaxAge is the maximum number of days to retain old log files based on the
	// timestamp encoded in their filename.
	OutputFileMaxAge int `json:"output-file-max-age"`

	// 	output RocketMQ
	OutputRocketMQNameServer []string `json:"output-rocketmq-name-server"`
	OutputRocketMQTopic      string   `json:"output-rocketmq-topic"`
	OutputRocketMQAccessKey  string   `json:"output-rocketmq-access-key"`
	OutputRocketMQSecretKey  string   `json:"output-rocketmq-secret-key"`

	// --- filter ---
	IncludeFilterMethodMatch string `json:"include-filter-method-match"`

	// --- rate limit ---
	// Query per second
	RateLimitQPS int `json:"rate-limit-qps"`

	// --- other ---
	Codec string `json:"codec"`
}

AppSettings is the struct of main configuration

type MultiIntOption

type MultiIntOption struct {
	Params *[]int
}

MultiOption allows to specify multiple flags with same name and collects all values into array

func (*MultiIntOption) Set

func (h *MultiIntOption) Set(value string) error

Set gets called multiple times for each flag with same name

func (*MultiIntOption) String

func (h *MultiIntOption) String() string

type MultiStringOption

type MultiStringOption struct {
	Params *[]string
}

func (*MultiStringOption) Set

func (h *MultiStringOption) Set(value string) error

Set gets called multiple times for each flag with same name

func (*MultiStringOption) String

func (h *MultiStringOption) String() string

Jump to

Keyboard shortcuts

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