gitee.com/h79/goutils@v1.22.10/mq/config.go (about) 1 package mq 2 3 type ClientConfig struct { 4 GroupID string `json:"groupId" yaml:"groupId" xml:"groupId"` 5 Server string `json:"server" yaml:"server" xml:"server"` 6 Domain string `json:"domain" yaml:"domain" xml:"domain"` 7 GroupName string `json:"groupName" yaml:"groupName" xml:"groupName"` 8 InstanceName string `json:"instance" yaml:"instance" xml:"instance"` 9 } 10 11 type Credentials struct { 12 AccessKey string `json:"accessKey" yaml:"accessKey" xml:"accessKey"` 13 SecretKey string `json:"secretKey" yaml:"secretKey" xml:"secretKey"` 14 SecretToken string `json:"secretToken" yaml:"secretToken" xml:"secretToken"` 15 } 16 17 type Config struct { 18 Client ClientConfig `json:"client" yaml:"client" xml:"client"` 19 Credentials Credentials `json:"credentials" yaml:"credentials" xml:"credentials"` 20 LogLevel int `json:"logLevel" yaml:"logLevel" xml:"logLevel"` 21 ProducerConf ProducerConfig `json:"producer" yaml:"producer" xml:"producer"` 22 ConsumerConf ConsumerConfig `json:"consumer" yaml:"consumer" xml:"consumer"` 23 } 24 25 type ProducerConfig struct { 26 Timeout int `json:"timeout" yaml:"timeout" xml:"timeout"` 27 Compress int `json:"compress" yaml:"compress" xml:"compress"` 28 Size int `json:"size" yaml:"size" xml:"size"` 29 Retry int `json:"retry" yaml:"retry" xml:"retry"` 30 } 31 32 type ConsumerConfig struct { 33 ThreadCount int `json:"threadCount" yaml:"threadCount" xml:"threadCount"` 34 Model int `json:"model" yaml:"model" xml:"model"` 35 Size int `json:"size" yaml:"size" xml:"size"` 36 }