Documentation ¶
Index ¶
- func Load(configPath string) error
- type ConnectorConf
- type ConsumerConf
- type DataBaseConf
- type Fed
- func (f Fed) GetDBConfig(name string) (driver string, createAddr string, addr string, persistUnderlying string, ...)
- func (f Fed) GetMsgBusAddress() string
- func (f Fed) GetMsgBusReqTopic() string
- func (f Fed) GetMsgBusResTopic() string
- func (f Fed) GetServerFromDB() bool
- func (f Fed) GetServerName() []string
- type ProducerConf
- type TransportConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectorConf ¶
type ConsumerConf ¶
type ConsumerConf struct { Topic string `yaml:"topic"` Group string `yaml:"group"` Underlying string `yaml:"underlying"` Name string `yaml:"name"` AutoCommit *bool `yaml:"enable_auto_commit,omitempty"` CommitIntervalMS *int `yaml:"auto_commit_interval_ms,omitempty"` AutoOffsetReset *string `yaml:"topic_auto_offset_reset,omitempty"` EnableGoChannel *bool `yaml:"go_channel_enable,omitempty"` }
func (*ConsumerConf) AutoCommitIntervalMS ¶
func (c *ConsumerConf) AutoCommitIntervalMS() *int
func (*ConsumerConf) EnableAutoCommit ¶
func (c *ConsumerConf) EnableAutoCommit() *bool
func (*ConsumerConf) GoChannelEnable ¶
func (c *ConsumerConf) GoChannelEnable() *bool
func (*ConsumerConf) TopicAutoOffsetReset ¶
func (c *ConsumerConf) TopicAutoOffsetReset() *string
type DataBaseConf ¶
type Fed ¶
type Fed struct { Version int `yaml:"version"` Homeserver struct { ServerName []string `yaml:"server_name"` ServerFromDB bool `yaml:"server_from_db"` } `yaml:"homeserver"` TransportConfs []TransportConf `yaml:"transport_configs"` // The configuration for talking to kafka. Kafka struct { CommonCfg struct { EnableIdempotence bool `yaml:"enable_idempotence"` ForceAsyncSend bool `yaml:"force_async_send"` ReplicaFactor int `yaml:"replica_factor"` NumPartitions int `yaml:"num_partitions"` NumProducers int `yaml:"num_producers"` } `yaml:"common_cfg"` Producer struct { DBUpdates ProducerConf `yaml:"db_updates"` DispatchOutput ProducerConf `yaml:"dispatch_output"` FedAPIOutput ProducerConf `yaml:"fedapi_output"` GetMissingEvent ProducerConf `yaml:"get_missing_event"` DownloadMedia ProducerConf `yaml:"download_media"` InputRoomEvent ProducerConf `yaml:"input_room_event"` } `yaml:"producers"` Consumer struct { DispatchInput ConsumerConf `yaml:"dispatch_input"` SenderInput ConsumerConf `yaml:"fedsenser_input"` FedAPIInput ConsumerConf `yaml:"fedapi_input"` FedBackFill ConsumerConf `yaml:"fed_backfill"` EduSenderInput ConsumerConf `yaml:"edusender_input"` SettingUpdate ConsumerConf `yaml:"setting_update"` GetMissingEvent ConsumerConf `yaml:"get_missing_event"` } `yaml:"consumers"` } `yaml:"kafka"` Nats struct { Uri string `yaml:"uri"` } `yaml:"nats"` Rpc struct { RsQryTopic string `yaml:"rs_qry_topic"` PrQryTopic string `yaml:"pr_qry_topic"` AliasTopic string `yaml:"alias_topic"` RoomInputTopic string `yaml:"room_input_topic"` FedTopic string `yaml:"fed_topic"` FedAliasTopic string `yaml:"fed_alias_topic"` FedProfileTopic string `yaml:"fed_profile_topic"` FedAvatarTopic string `yaml:"fed_avatar_topic"` FedDisplayNameTopic string `yaml:"fed_displayname_topic"` FedRsQryTopic string `yaml:"fed_rs_qry_topic"` FedRsDownloadTopic string `yaml:"fed_download_topic"` FedRsInviteTopic string `yaml:"fed_invite_topic"` FedUserInfoTopic string `yaml:"fed_user_info_topic"` FedRsMakeJoinTopic string `yaml:"fed_makejoin_topic"` FedRsSendJoinTopic string `yaml:"fed_sendjoin_topic"` FedRsMakeLeaveTopic string `yaml:"fed_makeleave_topic"` FedRsSendLeaveTopic string `yaml:"fed_sendleave_topic"` } `yaml:"rpc"` Media struct { UploadUrl string `yaml:"upload_url"` } `yaml:"media"` Database struct { CreateDB DataBaseConf `yaml:"create_db"` RoomServer DataBaseConf `yaml:"room_server"` Federation DataBaseConf `yaml:"federation"` ServerConf DataBaseConf `yaml:"server_conf"` ServerKey DataBaseConf `yaml:"server_key"` Encryption DataBaseConf `yaml:"encryption"` Account DataBaseConf `yaml:"account"` UseSync bool `yaml:"use_sync"` } `yaml:"database"` Redis struct { Uris []string `yaml:"uris"` } `yaml:"redis"` Log struct { Debug bool `yaml:"debug"` Level string `yaml:"level"` Files []string `yaml:"files"` Underlying string `yaml:"underlying"` WriteToStdout bool `yaml:"write_to_stdout"` RedirectStderr bool `yaml:"redirect_stderr"` ZapConfig struct { MaxSize int `yaml:"max_size"` MaxBackups int `yaml:"max_backups"` MaxAge int `yaml:"max_age"` LocalTime bool `yaml:"localtime"` Compress bool `yaml:"compress"` JsonFormat bool `yaml:"json_format"` BtEnabled bool `yaml:"bt_enabled"` BtLevel string `yaml:"bt_level"` } `yaml:"zap_config"` } `yaml:"log"` Cache struct { DurationDefault int `yaml:"durationDefault"` DurationRefresh int `yaml:"durationRefresh"` } `yaml:"cache"` NotaryService struct { CliHttpsEnable bool `yaml:"cli_https_enable"` RootCAUrl string `yaml:"root_ca_url"` CRLUrl string `yaml:"crl_url"` CertUrl string `yaml:"cert_url"` } `yaml:"notary_service"` }
func GetFedConfig ¶
func GetFedConfig() Fed
func (Fed) GetDBConfig ¶
func (Fed) GetMsgBusAddress ¶
func (Fed) GetMsgBusReqTopic ¶
func (Fed) GetMsgBusResTopic ¶
func (Fed) GetServerFromDB ¶
func (Fed) GetServerName ¶
type ProducerConf ¶
type ProducerConf struct { Topic string `yaml:"topic"` Underlying string `yaml:"underlying"` Name string `yaml:"name"` Inst int `yaml:"inst"` LingerMs *string `yaml:"linger_ms,omitempty"` }
func (*ProducerConf) LingerMsConf ¶
func (p *ProducerConf) LingerMsConf() *string
type TransportConf ¶
Click to show internal directories.
Click to hide internal directories.