Documentation
¶
Index ¶
- Constants
- func FlushConfig() error
- func GetFileRotatorSize() int64
- func GetGRPCServerNetworkAndAddress() (string, string)
- func GetMaxMessageSize() int
- func GetRootPath() string
- func InitConfig() error
- func SetBrokerCfg(topic string, brokerCfg *BrokerCfg)
- type BrokerCfg
- type Config
- type Option
- type PubCfg
- type SubCfg
Constants ¶
View Source
const ( EnvGomegaConfigPath = "GOMEGA_CONFIG_PATH" GomegaConfigName = "gomega_config.json" )
View Source
const ( MaxDataSize = 1024 * 1024 MaxFileSize = 1024 * 1024 * 1024 DefaultQueueMaxSize uint64 = 1024 )
View Source
const ( IdxFileSuffix = ".idx" DataFileSuffix = ".dat" )
View Source
const ( DefaultMaxTimeout = 60 DefaultMaxRetryCount = 3 DefaultRetryIntervalMs = 5 DefaultItemLifetimeInQueue = 600 )
Variables ¶
This section is empty.
Functions ¶
func GetFileRotatorSize ¶
func GetFileRotatorSize() int64
func GetMaxMessageSize ¶
func GetMaxMessageSize() int
func GetRootPath ¶
func GetRootPath() string
func InitConfig ¶
func InitConfig() error
func SetBrokerCfg ¶
Types ¶
type Config ¶
type Config struct {
GRPCServerNetwork string `json:"grpc_server_network" yaml:"grpc_server_network"`
GRPCServerAddress string `json:"grpc_server_address" yaml:"grpc_server_address"`
RootPath string `json:"root_path" yaml:"root_path"`
MaxMessageSize int `json:"max_message_size" yaml:"max_message_size"`
FileRotatorSize int64 `json:"file_rotator_size" yaml:"file_rotator_size"`
BrokerCfgMap map[string]*BrokerCfg `json:"broker_cfg_map" yaml:"broker_cfg_map"`
}
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
Click to show internal directories.
Click to hide internal directories.