helper

package
v0.0.0-...-c2c101f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger log.Logger

Functions

This section is empty.

Types

type AsyncConcurrencyConfig

type AsyncConcurrencyConfig struct {
	DelSegThreadNum                 int `json:"del_seg_thread_num"`
	DelSegThreadChanSize            int `json:"del_seg_thread_chan_size"`
	DelSegReplicaNodeCount          int `json:"del_seg_replica_node_count"`
	DelFileThreadNum                int `json:"del_file_thread_num"`
	DelFileChanSize                 int `json:"del_file_chan_size"`
	ConsoleDelFsThreadNum           int `json:"console_del_fs_thread_num"`
	ConsoleDelFsChanSize            int `json:"console_del_fs_chan_size"`
	ConsoleDelFilesThreadNum        int `json:"console_del_files_thread_num"`
	ConsoleDelFilesChanSize         int `json:"console_del_files_chan_size"`
	FsMonitorThreadNum              int `json:"fs_monitor_thread_num"`
	FsMonitorChanSize               int `json:"fs_monitor_chan_size"`
	GcDelSegThreadNum               int `json:"gc_del_seg_thread_num"`
	GCDelSegChanSize                int `json:"gc_del_seg_chan_size"`
	GcScanSegGcexecutingLimitMinute int `json:"gc_scan_seg_gcexecuting_limit_minute"`
	GcScanSegGccompletedLimitHour   int `json:"gc_scan_seg_gccompleted_limit_hour"`
	UpdateSegThreadNum              int `json:"update_seg_thread_num"`
	UpdateSegThreadChanSize         int `json:"update_seg_thread_chan_size"`
}

type AsyncTasksConfig

type AsyncTasksConfig struct {
	FsMonitorConfig        FsMonitorConfig        `json:"fs_monitor_config"`
	LogConfig              LogConfig              `json:"log_config"`
	GcConfig               GcConfig               `json:"gc_config"`
	AutumnConfig           AutumnConfig           `json:"autumn_config"`
	SnowflakeWorkerId      uint64                 `json:"snowflake_worker_id"`
	RegionId               string                 `json:"region_id"`
	AsyncConcurrencyConfig AsyncConcurrencyConfig `json:"async_concurrency_config"`
	PrometheusAddr         string                 `json:"prometheus_addr"`
}

type AutumnConfig

type AutumnConfig struct {
	Endpoints []string `json:"endpoints"`
	Enable    bool     `json:"enable"`
}

type BackendConfig

type BackendConfig struct {
	BackendType      int    `json:"backend_type"`
	ThreadNum        int    `json:"thread_num"`
	Endpoint         string `json:"endpoint"`
	EndpointInternal string `json:"endpoint_internal"`
}

type CommonConfig

type CommonConfig struct {
	MetaConfig   MetaConfig   `json:"meta_config"`
	MsgBusConfig MsgBusConfig `json:"msg_bus_config"`
	S3Config     S3Config     `json:"s3_config"`
}

type ConfigLoader

type ConfigLoader struct {
	Endpoints []string
	// contains filtered or unexported fields
}

func NewConfigLoader

func NewConfigLoader() (cl *ConfigLoader, err error)

func (*ConfigLoader) LoadAsyncConfig

func (cl *ConfigLoader) LoadAsyncConfig(ctx context.Context) (config *GlobalAsyncConfig, err error)

func (*ConfigLoader) LoadMetaConfig

func (cl *ConfigLoader) LoadMetaConfig(ctx context.Context) (config *GlobalMetaConfig, err error)

type EtcdConfig

type EtcdConfig struct {
	Server []string `toml:"server"`
}

type EtcdEndpoint

type EtcdEndpoint struct {
	EtcdConfig EtcdConfig `toml:"etcd_config"`
}

type FsConsoleServiceConfig

type FsConsoleServiceConfig struct {
	Port       string `json:"port"`
	FsCapacity uint64 `json:"fs_capacity"`
}

type FsMonitorConfig

type FsMonitorConfig struct {
	Topic      string `json:"topic"`
	Period     int    `json:"period"`
	Type       int    `json:"msg_bus_type"`
	ServerList string `json:"server_list"`
}

type GcConfig

type GcConfig struct {
	MaxGcSegs int    `json:"max_gc_segments"`
	GcPeriod  int    `json:"gc_period"`
	GcUnit    string `json:"gc_unit"`
}

type GlobalAsyncConfig

type GlobalAsyncConfig struct {
	AsyncTasksConfig AsyncTasksConfig
	CommonConfig     CommonConfig
}

type GlobalMetaConfig

type GlobalMetaConfig struct {
	MetaServiceConfig MetaServiceConfig
	CommonConfig      CommonConfig
	BackendConfig     BackendConfig
}

type LogConfig

type LogConfig struct {
	LogDir   string `json:"log_dir"`
	LogLevel string `json:"log_level"`
}

type MetaConcurrencyConfig

type MetaConcurrencyConfig struct {
	UpdateFileInfoCronMinute       int `json:"update_file_info_cron_minute"`
	UpdateFileInfoThreadNum        int `json:"update_file_info_thread_num"`
	UpdateFileInfoThreadChanSize   int `json:"update_file_info_thread_chan_size"`
	GcmapCacheThreadNum            int `json:"gcmap_cache_thread_num"`
	GcmapCacheThreadChanSize       int `json:"gcmap_cache_thread_chan_size"`
	ThreadSelectorReplicaNodeCount int `json:"thread_selector_replica_node_count"`
}

type MetaConfig

type MetaConfig struct {
	MetaStoreType string `json:"meta_store_type"`
	MetaStoreInfo string `json:"meta_store_info"`
}

type MetaServiceConfig

type MetaServiceConfig struct {
	TlsConfig              TlsConfig              `json:"tls_config"`
	ServiceConfig          ServiceConfig          `json:"service_config"`
	LogConfig              LogConfig              `json:"log_config"`
	FsConsoleServiceConfig FsConsoleServiceConfig `json:"fs_console_service_config"`
	AutumnConfig           AutumnConfig           `json:"autumn_config"`
	MetaConcurrencyConfig  MetaConcurrencyConfig  `json:"meta_concurrency_config"`
}

type MsgBusConfig

type MsgBusConfig struct {
	MsgBusType    int    `json:"msg_bus_type"`
	BrokerList    string `json:"broker_list"`
	PartitionsNum int    `json:"partition_num"`
}

type S3Config

type S3Config struct {
	Region   string `json:"region"`
	Bucket   string `json:"bucket"`
	Ak       string `json:"ak"`
	Sk       string `json:"sk"`
	Endpoint string `json:"endpoint"`
}

type ServiceConfig

type ServiceConfig struct {
	WriteFileThreadNum      int    `json:"write_file_thread_num"`
	WriteFileThreadChanSize int    `json:"write_file_thread_chan_size"`
	Port                    string `json:"port"`
}

type TlsConfig

type TlsConfig struct {
	TlsKeyPath  string `json:"tls_key_path"`
	TlsCertPath string `json:"tls_cert_path"`
}

Jump to

Keyboard shortcuts

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