config

package
v0.0.0-...-757bf47 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefaultArcConfig

func SetDefaultArcConfig()

SetDefaultArcConfig -

func SetDefaultCacheConfig

func SetDefaultCacheConfig()

SetDefaultCacheConfig -

func SetDefaultGRPCConfig

func SetDefaultGRPCConfig()

SetDefaultGRPCConfig -

func SetDefaultKafkaConfig

func SetDefaultKafkaConfig()

SetDefaultKafkaConfig -

func SetDefaultPprofConfig

func SetDefaultPprofConfig()

SetDefaultPprofConfig -

func SetDefaultTaosConfig

func SetDefaultTaosConfig()

SetDefaultTaosConfig -

func SetDefaultWorkConfig

func SetDefaultWorkConfig()

SetDefaultWorkConfig -

Types

type ArcConfig

type ArcConfig struct {
	Basic *basic.BasicConfig

	Work  *WorkConfig          `toml:"-"`
	Log   *logging.LogConfig   `toml:"-"`
	Trace *tracing.TraceConfig `toml:"-"`
	Cache *CacheConfig         `toml:"-"`
	Kafka *KafkaConfig         `toml:"-"`
	Taos  *TaosConfig          `toml:"-"`
	Grpc  *GRPCConfig          `toml:"-"`
	Pprof *PprofConfig         `toml:"-"`
}

ArcConfig 配置

func GetConfig

func GetConfig() *ArcConfig

GetConfig Get默认配置参数

type CacheConfig

type CacheConfig struct {
	Enable     bool `toml:"enable"`
	TimeoutMin int  `toml:"timeoutmin"`
	ExpireMs   int  `toml:"expirems"`
	Search     bool `toml:"search"`
}

CacheConfig struct

func GetCacheConfig

func GetCacheConfig() *CacheConfig

GetCacheConfig -

type GRPCConfig

type GRPCConfig struct {
	Enable bool   `toml:"enable"`
	Server string `toml:"server"`
}

GRPCConfig -

func GetGRPCConfig

func GetGRPCConfig() *GRPCConfig

GetGRPCConfig -

type KafkaConfig

type KafkaConfig struct {
	Enable          bool   `toml:"enable"`
	Server          string `toml:"server"`
	GroupID         string `toml:"groupID"`
	MessageMaxBytes int    `toml:"messageMaxBytes"`
	Topic           string `toml:"topic"`
	Interval        int    `toml:"interval"`
}

KafkaConfig -

func GetKafkaConfig

func GetKafkaConfig() *KafkaConfig

GetKafkaConfig -

type PprofConfig

type PprofConfig struct {
	Enable bool `toml:"enable"`
}

PprofConfig -

func GetPprofConfig

func GetPprofConfig() *PprofConfig

GetPprofConfig -

type TaosConfig

type TaosConfig struct {
	Host     string `toml:"host"`
	Enable   bool   `toml:"enable"`
	Interval int    `toml:"interval"`
	TagName  string `toml:"tag_name"`
}

TaosConfig -

func GetTaosConfig

func GetTaosConfig() *TaosConfig

GetTaosConfig -

type WorkConfig

type WorkConfig struct {
	DataPath                         string `toml:"dataPath"`
	SaveType                         int    `toml:"saveType"`
	DebugMod                         int    `toml:"debugMod"`
	SaveDuration                     string `toml:"saveduration"`
	SaveNum                          int    `toml:"saveNum"`
	WorkCount                        int    `toml:"workCount"`
	ChanCapacity                     int    `toml:"chanCapacity"`
	ArcVolumeQueueLen                int    `toml:"arcVolumeQueueLen"`
	ArcVolumeQueueReadTimeoutSeconds int    `toml:"arcVolumeQueueReadTimeoutSeconds"`
	ArcVolumeQueueNum                int    `toml:"arcVolumeQueueNum"`
	AllowAutomaticallySaveFile       bool   `toml:"allowAutomaticallySaveFile"` // 允许每分钟自动保存到文件
	FrameOffset                      int    `toml:"frameOffset"`                // 从缓存查询数据, 多查询的帧数
	TimeOut                          int    `toml:"timeOut"`                    // 超时落盘,单位:s
}

WorkConfig 配置

func GetWorkConfig

func GetWorkConfig() *WorkConfig

GetWorkConfig Get默认配置参数

Jump to

Keyboard shortcuts

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