Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultFileDir = "root.data" DefaultMaxBranchSessionSize = 1024 * 16 DefaultMaxGlobalSessionSize = 512 DefaultWriteBufferSize = 1024 * 16 DefaultServiceSessionReloadReadSize = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBStoreConfig ¶
type FileStoreConfig ¶
type FileStoreConfig struct { FileDir string `default:"root.data" yaml:"file_dir" json:"file_dir,omitempty"` FileWriteBufferCacheSize int `default:"16384" yaml:"file_write_buffer_cache_size" json:"file_write_buffer_cache_size,omitempty"` FlushDiskMode FlushDiskMode `default:"1" yaml:"flush_disk_mode" json:"flush_disk_mode,omitempty"` SessionReloadReadSize int `default:"100" yaml:"session_reload_read_size" json:"session_reload_read_size,omitempty"` }
func GetDefaultFileStoreConfig ¶
func GetDefaultFileStoreConfig() FileStoreConfig
type FlushDiskMode ¶
type FlushDiskMode int
const ( /** * sync flush disk */ FlushdiskModeSyncModel FlushDiskMode = iota /** * async flush disk */ FlushdiskModeAsyncModel )
type ServerConfig ¶
type ServerConfig struct { Port string `default:"8091" yaml:"port" json:"port,omitempty"` MaxRollbackRetryTimeout int64 `default:"-1" yaml:"max_rollback_retry_timeout" json:"max_rollback_retry_timeout,omitempty"` RollbackRetryTimeoutUnlockEnable bool `default:"false" yaml:"rollback_retry_timeout_unlock_enable" json:"rollback_retry_timeout_unlock_enable,omitempty"` MaxCommitRetryTimeout int64 `default:"-1" yaml:"max_commit_retry_timeout" json:"max_commit_retry_timeout,omitempty"` TimeoutRetryPeriod time.Duration `default:"1s" yaml:"timeout_retry_period" json:"timeout_retry_period,omitempty"` RollingBackRetryPeriod time.Duration `default:"1s" yaml:"rolling_back_retry_period" json:"rolling_back_retry_period,omitempty"` CommittingRetryPeriod time.Duration `default:"1s" yaml:"committing_retry_period" json:"committing_retry_period,omitempty"` AsyncCommittingRetryPeriod time.Duration `default:"1s" yaml:"async_committing_retry_period" json:"async_committing_retry_period,omitempty"` LogDeletePeriod time.Duration `default:"24h" yaml:"log_delete_period" json:"log_delete_period,omitempty"` GettyConfig struct { SessionTimeout time.Duration `default:"60s" yaml:"session_timeout" json:"session_timeout,omitempty"` GettySessionParam config.GettySessionParam `required:"true" yaml:"getty_session_param" json:"getty_session_param,omitempty"` } `required:"true" yaml:"getty_config" json:"getty_config,omitempty"` UndoConfig struct { LogSaveDays int16 `default:"7" yaml:"log_save_days" json:"log_save_days,omitempty"` } `required:"true" yaml:"undo_config" json:"undo_config,omitempty"` StoreConfig StoreConfig `required:"true" yaml:"store_config" json:"store_config,omitempty"` RegistryConfig config.RegistryConfig `yaml:"registry_config" json:"registry_config,omitempty"` //注册中心配置信息 ConfigCenterConfig config.ConfigCenterConfig `yaml:"config_center" json:"config_center,omitempty"` //配置中心配置信息 }
func GetServerConfig ¶
func GetServerConfig() *ServerConfig
func InitConf ¶
func InitConf(configPath string) (*ServerConfig, error)
type ServerConfigListener ¶
type ServerConfigListener struct { }
func (ServerConfigListener) Process ¶
func (ServerConfigListener) Process(event *config_center.ConfigChangeEvent)
type StoreConfig ¶
type StoreConfig struct { MaxBranchSessionSize int `default:"16384" yaml:"max_branch_session_size" json:"max_branch_session_size,omitempty"` MaxGlobalSessionSize int `default:"512" yaml:"max_global_session_size" json:"max_global_session_size,omitempty"` StoreMode string `default:"file" yaml:"mode" json:"mode,omitempty"` FileStoreConfig FileStoreConfig `yaml:"file" json:"file,omitempty"` DBStoreConfig DBStoreConfig `yaml:"db" json:"db,omitempty"` }
func GetStoreConfig ¶
func GetStoreConfig() StoreConfig
Click to show internal directories.
Click to hide internal directories.