Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { // Captcha 验证码配置 Captcha *Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"` }
App 应用配置
type Captcha ¶
type Captcha struct { // Height 高度 Height int `mapstructure:"height" json:"height" yaml:"height"` // Width 宽度 Width int `mapstructure:"width" json:"width" yaml:"width"` // Length 长度 Length int `mapstructure:"length" json:"length" yaml:"length"` }
Captcha 验证码配置
type Channel ¶
type Channel struct { // Hystrix 熔断配置 Hystrix *Hystrix `mapstructure:"hystrix" json:"hystrix" yaml:"hystrix"` // Hosts 通道地址 Hosts []string `mapstructure:"hosts" json:"hosts" yaml:"hosts"` // Host 通道地址 Host string `mapstructure:"host" json:"host" yaml:"host"` // Port 通道端口 Port int `mapstructure:"port" json:"port" yaml:"port"` // Token 通道token Token string `mapstructure:"token" json:"token" yaml:"token"` // Name 通道名称 Name string `mapstructure:"name" json:"name" yaml:"name"` // Database 数据库名 Database string `mapstructure:"database" json:"database" yaml:"database"` // Timeout 超时时间 Timeout int `mapstructure:"timeout" json:"timeout" yaml:"timeout"` // MasterName 主节点 MasterName string `mapstructure:"master_name" json:"master_name" yaml:"master_name"` // Username 用户名 Username string `mapstructure:"username" json:"username" yaml:"username"` // Password 密码 Password string `mapstructure:"password" json:"password" yaml:"password"` }
Channel 通道配置
type Client ¶
type Client struct { // MySQL MySQL配置 MySQL *Channel `mapstructure:"mysql" json:"mysql" yaml:"mysql"` // Redis Redis配置 Redis *Channel `mapstructure:"redis" json:"redis" yaml:"redis"` // Mongodb mongodb配置 Mongodb *Channel `mapstructure:"mongodb" json:"mongodb" yaml:"mongodb"` // Smtp 邮件配置 Smtp *Channel `mapstructure:"smtp" json:"smtp" yaml:"smtp"` }
Client 客户端配置
type Config ¶
type Config struct { // Server The address to listen on for HTTP requests. Server *Server // Client 客户端配置 Client *Client // App 应用配置 App *App }
Config is the configuration for the server.
type Hystrix ¶
type Hystrix struct { // Name 熔断器名称 Name string `mapstructure:"name" json:"name" yaml:"name"` // Timeout 超时时间 Timeout int `mapstructure:"timeout" json:"timeout" yaml:"timeout"` // MaxConcurrent 最大并发数 MaxConcurrent int `mapstructure:"max_concurrent" json:"max_concurrent" yaml:"max_concurrent"` // RequestVolumeThreshold 请求阈值 RequestVolumeThreshold int `mapstructure:"request_volume_threshold" json:"request_volume_threshold" yaml:"request_volume_threshold"` // SleepWindow 熔断时间 SleepWindow int `mapstructure:"sleep_window" json:"sleep_window" yaml:"sleep_window"` // ErrorPercentThreshold 错误百分比 ErrorPercentThreshold int `mapstructure:"error_percent_threshold" json:"error_percent_threshold" yaml:"error_percent_threshold"` }
Hystrix 客户端熔断配置
type Log ¶
type Log struct { // Level 日志级别 Level string `mapstructure:"level" json:"level" yaml:"level"` // File 日志文件 File string `mapstructure:"file" json:"file" yaml:"file"` }
Log 日志配置
type Server ¶
type Server struct { // Log 日志配置 Log *Log `mapstructure:"log" json:"log" yaml:"log"` // Hystrix 熔断配置 Hystrix *Hystrix `mapstructure:"hystrix" json:"hystrix" yaml:"hystrix"` // Host 服务地址 Host string `mapstructure:"host" json:"host" yaml:"host"` // Port 端口 Port int `mapstructure:"port" json:"port" yaml:"port"` // Domain 域名 Domain string `mapstructure:"domain" json:"domain" yaml:"domain"` }
Server 服务配置
Click to show internal directories.
Click to hide internal directories.