Documentation
¶
Index ¶
- Variables
- func CloseKafka()
- func InitCronJob()
- func InitKafka()
- func InitLogger()
- func InitLogstash()
- func InitMongo()
- func InitMysql()
- func InitMysqlC()
- func InitPrometheus()
- func InitRabbitMQ()
- func InitRabbitMQExchangeChannel()
- func InitRedis()
- func InitRedisSentinel()
- func InitRouter() *gin.Engine
- func InitServiceInterface()
- func LoadConfig()
- func MigrateTables()
- func MigrateTablesC()
- func RegisterMetrics()
- func Run() *gin.Engine
- func SetPool()
- func SetPoolC()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Define a counter metric RequestCount = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "myapp_requests_total", Help: "Total number of requests processed by the MyApp web server.", }, []string{"method", "path", "status"}, ) ErrorCount = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "myapp_requests_errors_total", Help: "Total number of error requests processed by the MyApp web server.", }, []string{"method", "path", "status"}, ) // Define a histogram metric RequestDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "http_request_duration_seconds", Help: "Histogram of response time for handler in seconds", Buckets: prometheus.DefBuckets, }, []string{"method", "path"}, ) // Request size in bytes RequestSizeBytes = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "http_request_size_bytes", Help: "Size of HTTP requests in bytes", Buckets: prometheus.ExponentialBuckets(100, 10, 6), }, []string{"method", "path"}, ) // Response size in bytes ResponseSizeBytes = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "http_response_size_bytes", Help: "Size of HTTP responses in bytes", Buckets: prometheus.ExponentialBuckets(100, 10, 6), }, []string{"method", "path"}, ) )
View Source
var KafkaProducer *kafka.Writer
Ininitialize kafka producer
Functions ¶
func InitCronJob ¶
func InitCronJob()
func InitRabbitMQ ¶
func InitRabbitMQ()
func InitRabbitMQExchangeChannel ¶
func InitRabbitMQExchangeChannel()
init rabbitmq exchange channel handle logging to discord
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.