Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enveronment string `json:"environment"`
*Database
*Redis
*Meilisearch
*Elasticsearch
*MongoDB
*Neo4j
*RabbitMQ
*Kafka
}
Config data config struct
type DBNode ¶
type DBNode struct {
Driver string `json:"driver"`
Source string `json:"source"`
Logging bool `json:"logging"`
MaxIdleConn int `json:"max_idle_conn"`
MaxOpenConn int `json:"max_open_conn"`
ConnMaxLifeTime time.Duration `json:"conn_max_life_time"`
Weight int `json:"weight"`
}
DBNode represents a single database node configuration
type Database ¶
type Database struct {
Master *DBNode `json:"master"`
Slaves []*DBNode `json:"slaves"`
Migrate bool `json:"migrate"`
Strategy string `json:"strategy"`
MaxRetry int `json:"max_retry"`
}
Database database config struct
type Elasticsearch ¶
type Elasticsearch struct {
Addresses []string `json:"addresses"`
Username string `json:"username"`
Password string `json:"password"`
}
Elasticsearch elasticsearch config struct
type Kafka ¶
type Kafka struct {
Brokers []string
ClientID string
ConsumerGroup string
Topic string
ReadTimeout time.Duration
WriteTimeout time.Duration
ConnectTimeout time.Duration
}
Kafka kafka config struct
type Meilisearch ¶
Meilisearch meilisearch config struct
type MongoDB ¶
type MongoDB struct {
Master *MongoNode `json:"master"`
Slaves []*MongoNode `json:"slaves"`
Strategy string `json:"strategy"`
MaxRetry int `json:"max_retry"`
}
MongoDB mongodb config struct
type MongoNode ¶
type MongoNode struct {
URI string `json:"uri"`
Logging bool `json:"logging"`
Weight int `json:"weight"`
}
MongoNode mongodb node config
Click to show internal directories.
Click to hide internal directories.