提交 ba5ef7b1 authored 作者: mooncake9527's avatar mooncake9527

update tag

上级 adebf4da
...@@ -102,41 +102,41 @@ func IsProd() bool { ...@@ -102,41 +102,41 @@ func IsProd() bool {
type Config struct { type Config struct {
l *sync.RWMutex l *sync.RWMutex
App App `yaml:"app" json:"app"` App App `yaml:"app" json:"app" mapstructure:"app"`
Auth Auth `yaml:"auth" json:"auth"` Auth Auth `yaml:"auth" json:"auth" mapstructure:"auth"`
ConfType string `yaml:"confType" json:"confType"` // local, consul, nacos ConfType string `yaml:"confType" json:"confType" mapstructure:"confType"` // local, consul, nacos
ConfCenter ConfCenter `yaml:"-" json:"-"` ConfCenter ConfCenter `yaml:"-" json:"-"`
Rd Rd `yaml:"rd" json:"rd"` // 注册中心 Rd Rd `yaml:"rd" json:"rd" mapstructure:"rd"` // 注册中心
Database []Database `yaml:"database" json:"database"` Database []Database `yaml:"database" json:"database" mapstructure:"database"`
Etcd Etcd `yaml:"etcd" json:"etcd"` Etcd Etcd `yaml:"etcd" json:"etcd" mapstructure:"etcd"`
Grpc Grpc `yaml:"grpc" json:"grpc"` Grpc Grpc `yaml:"grpc" json:"grpc" mapstructure:"grpc"`
GrpcClient []GrpcClient `yaml:"grpcClient" json:"grpcClient"` GrpcClient []GrpcClient `yaml:"grpcClient" json:"grpcClient" mapstructure:"grpcClient"`
HTTP HTTP `yaml:"http" json:"http"` HTTP HTTP `yaml:"http" json:"http" mapstructure:"http"`
Jaeger Jaeger `yaml:"jaeger" json:"jaeger"` Jaeger Jaeger `yaml:"jaeger" json:"jaeger" mapstructure:"jaeger"`
Logger Logger `yaml:"logger" json:"logger"` Logger Logger `yaml:"logger" json:"logger" mapstructure:"logger"`
Redis Redis `yaml:"redis" json:"redis"` Redis Redis `yaml:"redis" json:"redis" mapstructure:"redis"`
Cron Cron `yaml:"cron" json:"cron"` Cron Cron `yaml:"cron" json:"cron" mapstructure:"cron"`
Oss oss.AliOssConfig `yaml:"oss" json:"oss"` Oss oss.AliOssConfig `yaml:"oss" json:"oss" mapstructure:"oss"`
Content []byte `yaml:"-" json:"-"` Content []byte `yaml:"-" json:"-"`
} }
type Snowflake struct { type Snowflake struct {
Node int `yaml:"node" json:"node"` Node int `yaml:"node" json:"node" mapstructure:"node"`
} }
// 选择哪个配置中心 // 选择哪个配置中心
type ConfCenter struct { type ConfCenter struct {
Local Local `yaml:"-" json:"local"` Local Local `yaml:"-" json:"local" mapstructure:"local"`
Nacos NacosConfConfig `yaml:"nacos" json:"nacos"` Nacos NacosConfConfig `yaml:"nacos" json:"nacos" mapstructure:"nacos"`
Consul Consul `yaml:"-" json:"consul"` Consul Consul `yaml:"-" json:"consul" mapstructure:"consul"`
} }
type Rd struct { type Rd struct {
Type string `yaml:"type" json:"type"` Type string `yaml:"type" json:"type" mapstructure:"type"`
Nacos NacosSvcConfig `yaml:"nacos" json:"nacos"` Nacos NacosSvcConfig `yaml:"nacos" json:"nacos" mapstructure:"nacos"`
} }
func (x *Config) GetContent() []byte { func (x *Config) GetContent() []byte {
...@@ -172,123 +172,123 @@ type Local struct { ...@@ -172,123 +172,123 @@ type Local struct {
} }
type Auth struct { type Auth struct {
Enable bool `yaml:"enable" json:"enable"` Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
SignKey string `yaml:"signKey" json:"signKey"` SignKey string `yaml:"signKey" json:"signKey" mapstructure:"signKey"`
Expire time.Duration `yaml:"expire" json:"expire"` Expire time.Duration `yaml:"expire" json:"expire" mapstructure:"expire"`
} }
type Consul struct { type Consul struct {
Conf string `yaml:"conf" json:"conf"` Conf string `yaml:"conf" json:"conf" mapstructure:"conf"`
Addr string `yaml:"addr" json:"addr"` Addr string `yaml:"addr" json:"addr" mapstructure:"addr"`
Token string `yaml:"token" json:"token"` Token string `yaml:"token" json:"token" mapstructure:"token"`
} }
type Etcd struct { type Etcd struct {
Addrs []string `yaml:"addrs" json:"addrs"` Addrs []string `yaml:"addrs" json:"addrs" mapstructure:"addrs"`
} }
type Jaeger struct { type Jaeger struct {
AgentHost string `yaml:"agentHost" json:"agentHost"` AgentHost string `yaml:"agentHost" json:"agentHost" mapstructure:"agentHost"`
AgentPort int `yaml:"agentPort" json:"agentPort"` AgentPort int `yaml:"agentPort" json:"agentPort" mapstructure:"agentPort"`
} }
type ClientToken struct { type ClientToken struct {
AppID string `yaml:"appID" json:"appID"` AppID string `yaml:"appID" json:"appID" mapstructure:"appID"`
AppKey string `yaml:"appKey" json:"appKey"` AppKey string `yaml:"appKey" json:"appKey" mapstructure:"appKey"`
Enable bool `yaml:"enable" json:"enable"` Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
} }
type ClientSecure struct { type ClientSecure struct {
CaFile string `yaml:"caFile" json:"caFile"` CaFile string `yaml:"caFile" json:"caFile" mapstructure:"caFile"`
CertFile string `yaml:"certFile" json:"certFile"` CertFile string `yaml:"certFile" json:"certFile" mapstructure:"certFile"`
KeyFile string `yaml:"keyFile" json:"keyFile"` KeyFile string `yaml:"keyFile" json:"keyFile" mapstructure:"keyFile"`
ServerName string `yaml:"serverName" json:"serverName"` ServerName string `yaml:"serverName" json:"serverName" mapstructure:"serverName"`
Type string `yaml:"type" json:"type"` Type string `yaml:"type" json:"type" mapstructure:"type"`
} }
type ServerSecure struct { type ServerSecure struct {
CaFile string `yaml:"caFile" json:"caFile"` CaFile string `yaml:"caFile" json:"caFile" mapstructure:"caFile"`
CertFile string `yaml:"certFile" json:"certFile"` CertFile string `yaml:"certFile" json:"certFile" mapstructure:"certFile"`
KeyFile string `yaml:"keyFile" json:"keyFile"` KeyFile string `yaml:"keyFile" json:"keyFile" mapstructure:"keyFile"`
Type string `yaml:"type" json:"type"` Type string `yaml:"type" json:"type" mapstructure:"type"`
} }
type Email struct { type Email struct {
SMTPServer string `yaml:"smtpServer" json:"smtpServer"` SMTPServer string `yaml:"smtpServer" json:"smtpServer" mapstructure:"smtpServer"`
SMTPPort int `yaml:"smtpPort" json:"smtpPort"` SMTPPort int `yaml:"smtpPort" json:"smtpPort" mapstructure:"smtpPort"`
SMTPUsername string `yaml:"smtpUsername" json:"smtpUsername"` SMTPUsername string `yaml:"smtpUsername" json:"smtpUsername" mapstructure:"smtpUsername"`
SMTPPassword string `yaml:"smtpPassword" json:"smtpPassword"` SMTPPassword string `yaml:"smtpPassword" json:"smtpPassword" mapstructure:"smtpPassword"`
FromEmail string `yaml:"fromEmail" json:"fromEmail"` FromEmail string `yaml:"fromEmail" json:"fromEmail" mapstructure:"fromEmail"`
ExpireDuration string `yaml:"expireDuration" json:"expireDuration"` ExpireDuration string `yaml:"expireDuration" json:"expireDuration" mapstructure:"expireDuration"`
} }
type App struct { type App struct {
CacheType string `yaml:"cacheType" json:"cacheType"` CacheType string `yaml:"cacheType" json:"cacheType" mapstructure:"cacheType"`
ContextPath string `yaml:"contextPath" json:"contextPath"` ContextPath string `yaml:"contextPath" json:"contextPath" mapstructure:"contextPath"`
Middleware Middleware `yaml:"middleware" json:"middleware"` Middleware Middleware `yaml:"middleware" json:"middleware" mapstructure:"middleware"`
Env string `yaml:"env" json:"env"` Env string `yaml:"env" json:"env" mapstructure:"env"`
Host string `yaml:"host" json:"host"` Host string `yaml:"host" json:"host" mapstructure:"host"`
Name string `yaml:"name" json:"name"` Name string `yaml:"name" json:"name" mapstructure:"name"`
Version string `yaml:"version" json:"version"` Version string `yaml:"version" json:"version" mapstructure:"version"`
IPRateLimiter IPRateLimiter `yaml:"ipRateLimiter" json:"ipRateLimiter"` IPRateLimiter IPRateLimiter `yaml:"ipRateLimiter" json:"ipRateLimiter" mapstructure:"ipRateLimiter"`
HideSensitiveFields string `yaml:"hideSensitiveFields" json:"hideSensitiveFields"` HideSensitiveFields string `yaml:"hideSensitiveFields" json:"hideSensitiveFields" mapstructure:"hideSensitiveFields"`
ConfPath string `yaml:"-" json:"confPath"` ConfPath string `yaml:"-" json:"confPath" mapstructure:"confPath"`
PodName string `yaml:"-" json:"podName"` PodName string `yaml:"-" json:"podName" mapstructure:"podName"`
WebLog WebLog `yaml:"webLog" json:"webLog"` WebLog WebLog `yaml:"webLog" json:"webLog" mapstructure:"webLog"`
Email Email `yaml:"email" json:"email"` Email Email `yaml:"email" json:"email" mapstructure:"email"`
IDGeneration IDGeneration `yaml:"idGeneration" json:"idGeneration"` IDGeneration IDGeneration `yaml:"idGeneration" json:"idGeneration" mapstructure:"idGeneration"`
} }
type Middleware struct { type Middleware struct {
Cors Cors `yaml:"cors" json:"cors"` Cors Cors `yaml:"cors" json:"cors" mapstructure:"cors"`
RequestID RequestID `yaml:"requestID" json:"requestID"` RequestID RequestID `yaml:"requestID" json:"requestID" mapstructure:"requestID"`
EnableCircuitBreaker bool `yaml:"enableCircuitBreaker" json:"enableCircuitBreaker"` EnableCircuitBreaker bool `yaml:"enableCircuitBreaker" json:"enableCircuitBreaker" mapstructure:"enableCircuitBreaker"`
EnableHTTPProfile bool `yaml:"enableHTTPProfile" json:"enableHTTPProfile"` EnableHTTPProfile bool `yaml:"enableHTTPProfile" json:"enableHTTPProfile" mapstructure:"enableHTTPProfile"`
EnableLimit bool `yaml:"enableLimit" json:"enableLimit"` EnableLimit bool `yaml:"enableLimit" json:"enableLimit" mapstructure:"enableLimit"`
EnableMetrics bool `yaml:"enableMetrics" json:"enableMetrics"` EnableMetrics bool `yaml:"enableMetrics" json:"enableMetrics" mapstructure:"enableMetrics"`
EnableStat bool `yaml:"enableStat" json:"enableStat"` EnableStat bool `yaml:"enableStat" json:"enableStat" mapstructure:"enableStat"`
Trace Trace `yaml:"trace" json:"trace"` Trace Trace `yaml:"trace" json:"trace" mapstructure:"trace"`
} }
type Cors struct { type Cors struct {
Enable bool `yaml:"enable" json:"enable"` Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
AllowOrigins []string `yaml:"allowOrigins" json:"allowOrigins"` AllowOrigins []string `yaml:"allowOrigins" json:"allowOrigins" mapstructure:"allowOrigins"`
} }
type RequestID struct { type RequestID struct {
Key string `yaml:"key" json:"key"` Key string `yaml:"key" json:"key" mapstructure:"key"`
} }
type IDGeneration struct { type IDGeneration struct {
Type string `yaml:"type" json:"type"` // snowflake or leaf Type string `yaml:"type" json:"type" mapstructure:"type"` // snowflake or leaf
Leaf Leaf `yaml:"leaf" json:"leaf"` Leaf Leaf `yaml:"leaf" json:"leaf" mapstructure:"leaf"`
Snowflake Snowflake `yaml:"snowflake" json:"snowflake"` Snowflake Snowflake `yaml:"snowflake" json:"snowflake" mapstructure:"snowflake"`
} }
type WebLog struct { type WebLog struct {
Enable bool `yaml:"enable" json:"enable"` Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
Schema string `yaml:"schema" json:"schema"` Schema string `yaml:"schema" json:"schema" mapstructure:"schema"`
IgnorePaths []string `yaml:"ignorePaths" json:"ignorePaths"` IgnorePaths []string `yaml:"ignorePaths" json:"ignorePaths" mapstructure:"ignorePaths"`
} }
type Trace struct { type Trace struct {
Enable bool `yaml:"enable" json:"enable"` Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
SamplingRate float64 `yaml:"samplingRate" json:"samplingRate"` SamplingRate float64 `yaml:"samplingRate" json:"samplingRate" mapstructure:"samplingRate"`
} }
type IPRateLimiter struct { type IPRateLimiter struct {
Enable bool `yaml:"enable" json:"enable"` Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
Type string `yaml:"type" json:"type"` // redis or local Type string `yaml:"type" json:"type" mapstructure:"type"` // redis or local
Window string `yaml:"window" json:"window"` Window string `yaml:"window" json:"window" mapstructure:"window"`
MaxRequests int `yaml:"maxRequests" json:"maxRequests"` MaxRequests int `yaml:"maxRequests" json:"maxRequests" mapstructure:"maxRequests"`
Store RateLimiterStore `yaml:"store" json:"store"` Store RateLimiterStore `yaml:"store" json:"store" mapstructure:"store"`
} }
type RateLimiterStore struct { type RateLimiterStore struct {
Type string `yaml:"type" json:"type"` Type string `yaml:"type" json:"type" mapstructure:"type"`
Redis Redis `yaml:"redis" json:"redis"` Redis Redis `yaml:"redis" json:"redis" mapstructure:"redis"`
} }
func (x IPRateLimiter) Get() (time.Duration, int) { func (x IPRateLimiter) Get() (time.Duration, int) {
...@@ -306,121 +306,121 @@ func (x IPRateLimiter) Get() (time.Duration, int) { ...@@ -306,121 +306,121 @@ func (x IPRateLimiter) Get() (time.Duration, int) {
} }
type GrpcClient struct { type GrpcClient struct {
ClientSecure ClientSecure `yaml:"clientSecure" json:"clientSecure"` ClientSecure ClientSecure `yaml:"clientSecure" json:"clientSecure" mapstructure:"clientSecure"`
ClientToken ClientToken `yaml:"clientToken" json:"clientToken"` ClientToken ClientToken `yaml:"clientToken" json:"clientToken" mapstructure:"clientToken"`
Host string `yaml:"host" json:"host"` Host string `yaml:"host" json:"host" mapstructure:"host"`
Name string `yaml:"name" json:"name"` Name string `yaml:"name" json:"name" mapstructure:"name"`
Port int `yaml:"port" json:"port"` Port int `yaml:"port" json:"port" mapstructure:"port"`
RegistryDiscoveryType string `yaml:"registryDiscoveryType" json:"registryDiscoveryType"` RegistryDiscoveryType string `yaml:"registryDiscoveryType" json:"registryDiscoveryType" mapstructure:"registryDiscoveryType"`
Timeout int `yaml:"timeout" json:"timeout"` Timeout int `yaml:"timeout" json:"timeout" mapstructure:"timeout"`
} }
type Sqlite struct { type Sqlite struct {
ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime"` ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime" mapstructure:"connMaxLifetime"`
DBFile string `yaml:"dbFile" json:"dbFile"` DBFile string `yaml:"dbFile" json:"dbFile" mapstructure:"dbFile"`
EnableLog bool `yaml:"enableLog" json:"enableLog"` EnableLog bool `yaml:"enableLog" json:"enableLog" mapstructure:"enableLog"`
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns"` MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns" mapstructure:"maxIdleConns"`
MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns"` MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns" mapstructure:"maxOpenConns"`
} }
type Mysql struct { type Mysql struct {
ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime"` ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime" mapstructure:"connMaxLifetime"`
Dsn string `yaml:"dsn" json:"dsn"` Dsn string `yaml:"dsn" json:"dsn" mapstructure:"dsn"`
EnableLog bool `yaml:"enableLog" json:"enableLog"` EnableLog bool `yaml:"enableLog" json:"enableLog" mapstructure:"enableLog"`
MastersDsn []string `yaml:"mastersDsn" json:"mastersDsn"` MastersDsn []string `yaml:"mastersDsn" json:"mastersDsn" mapstructure:"mastersDsn"`
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns"` MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns" mapstructure:"maxIdleConns"`
MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns"` MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns" mapstructure:"maxOpenConns"`
SlavesDsn []string `yaml:"slavesDsn" json:"slavesDsn"` SlavesDsn []string `yaml:"slavesDsn" json:"slavesDsn" mapstructure:"slavesDsn"`
} }
type Postgresql struct { type Postgresql struct {
ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime"` ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime" mapstructure:"connMaxLifetime"`
Dsn string `yaml:"dsn" json:"dsn"` Dsn string `yaml:"dsn" json:"dsn" mapstructure:"dsn"`
EnableLog bool `yaml:"enableLog" json:"enableLog"` EnableLog bool `yaml:"enableLog" json:"enableLog" mapstructure:"enableLog"`
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns"` MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns" mapstructure:"maxIdleConns"`
MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns"` MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns" mapstructure:"maxOpenConns"`
} }
type Redis struct { type Redis struct {
DialTimeout int `yaml:"dialTimeout" json:"dialTimeout"` DialTimeout int `yaml:"dialTimeout" json:"dialTimeout" mapstructure:"dialTimeout"`
Dsn string `yaml:"dsn" json:"dsn"` Dsn string `yaml:"dsn" json:"dsn" mapstructure:"dsn"`
ReadTimeout int `yaml:"readTimeout" json:"readTimeout"` ReadTimeout int `yaml:"readTimeout" json:"readTimeout" mapstructure:"readTimeout"`
WriteTimeout int `yaml:"writeTimeout" json:"writeTimeout"` WriteTimeout int `yaml:"writeTimeout" json:"writeTimeout" mapstructure:"writeTimeout"`
} }
type Database struct { type Database struct {
Name string `yaml:"name" json:"name"` Name string `yaml:"name" json:"name" mapstructure:"name"`
Driver string `yaml:"driver" json:"driver"` Driver string `yaml:"driver" json:"driver" mapstructure:"driver"`
Mongodb Mongodb `yaml:"mongodb" json:"mongodb"` Mongodb Mongodb `yaml:"mongodb" json:"mongodb" mapstructure:"mongodb"`
Mysql Mysql `yaml:"mysql" json:"mysql"` Mysql Mysql `yaml:"mysql" json:"mysql" mapstructure:"mysql"`
Postgresql Mysql `yaml:"postgresql" json:"postgresql"` Postgresql Mysql `yaml:"postgresql" json:"postgresql" mapstructure:"postgresql"`
Sqlite Sqlite `yaml:"sqlite" json:"sqlite"` Sqlite Sqlite `yaml:"sqlite" json:"sqlite" mapstructure:"sqlite"`
} }
type Mongodb struct { type Mongodb struct {
Dsn string `yaml:"dsn" json:"dsn"` Dsn string `yaml:"dsn" json:"dsn" mapstructure:"dsn"`
} }
type Grpc struct { type Grpc struct {
EnableToken bool `yaml:"enableToken" json:"enableToken"` EnableToken bool `yaml:"enableToken" json:"enableToken" mapstructure:"enableToken"`
HTTPPort int `yaml:"httpPort" json:"httpPort"` HTTPPort int `yaml:"httpPort" json:"httpPort" mapstructure:"httpPort"`
Port int `yaml:"port" json:"port"` Port int `yaml:"port" json:"port" mapstructure:"port"`
ServerSecure ServerSecure `yaml:"serverSecure" json:"serverSecure"` ServerSecure ServerSecure `yaml:"serverSecure" json:"serverSecure" mapstructure:"serverSecure"`
} }
type Logger struct { type Logger struct {
Format string `yaml:"format" json:"format"` Format string `yaml:"format" json:"format" mapstructure:"format"`
IsSave bool `yaml:"isSave" json:"isSave"` IsSave bool `yaml:"isSave" json:"isSave" mapstructure:"isSave"`
Level string `yaml:"level" json:"level"` Level string `yaml:"level" json:"level" mapstructure:"level"`
LogFileConfig LogFileConfig `yaml:"logFileConfig" json:"logFileConfig"` LogFileConfig LogFileConfig `yaml:"logFileConfig" json:"logFileConfig" mapstructure:"logFileConfig"`
} }
type LogFileConfig struct { type LogFileConfig struct {
Filename string `yaml:"filename" json:"filename"` Filename string `yaml:"filename" json:"filename" mapstructure:"filename"`
MaxSize int `yaml:"maxSize" json:"maxSize"` MaxSize int `yaml:"maxSize" json:"maxSize" mapstructure:"maxSize"`
MaxBackups int `yaml:"maxBackups" json:"maxBackups"` MaxBackups int `yaml:"maxBackups" json:"maxBackups" mapstructure:"maxBackups"`
MaxAge int `yaml:"maxAge" json:"maxAge"` MaxAge int `yaml:"maxAge" json:"maxAge" mapstructure:"maxAge"`
IsCompression bool `yaml:"isCompression" json:"isCompression"` IsCompression bool `yaml:"isCompression" json:"isCompression" mapstructure:"isCompression"`
} }
type HTTP struct { type HTTP struct {
Port int `yaml:"port" json:"port"` Port int `yaml:"port" json:"port" mapstructure:"port"`
Timeout int `yaml:"timeout" json:"timeout"` Timeout int `yaml:"timeout" json:"timeout" mapstructure:"timeout"`
} }
type UpgradeConfig struct { type UpgradeConfig struct {
Limits []UpgradeLimit `yaml:"limits" json:"limits"` Limits []UpgradeLimit `yaml:"limits" json:"limits" mapstructure:"limits"`
} }
type UpgradeLimit struct { type UpgradeLimit struct {
MaxCount int64 `mapstructure:"max-count" json:"max-count" yaml:"max-count"` MaxCount int64 `mapstructure:"max-count" json:"max-count" yaml:"max-count"`
Duration time.Duration `yaml:"duration" json:"duration"` Duration time.Duration `yaml:"duration" json:"duration" mapstructure:"duration"`
Tip string `yaml:"tip" json:"tip"` Tip string `yaml:"tip" json:"tip" mapstructure:"tip"`
} }
type Cron struct { type Cron struct {
Type string `yaml:"type" json:"type"` // xxl Type string `yaml:"type" json:"type" mapstructure:"type"` // xxl
Enable bool `yaml:"enable" json:"enable"` Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
Schema string `yaml:"schema" json:"schema"` Schema string `yaml:"schema" json:"schema" mapstructure:"schema"`
XXL XXL `yaml:"xxl" json:"xxl"` XXL XXL `yaml:"xxl" json:"xxl" mapstructure:"xxl"`
} }
type XXL struct { type XXL struct {
Addr string `yaml:"addr" json:"addr"` // http://xxl-job-admin.xxl-job:8080/xxl-job-admin Addr string `yaml:"addr" json:"addr" mapstructure:"addr"` // http://xxl-job-admin.xxl-job:8080/xxl-job-admin
Token string `yaml:"token" json:"token"` // 12345 Token string `yaml:"token" json:"token" mapstructure:"token"` // 12345
Executor string `yaml:"executor" json:"executor"` // Executor string `yaml:"executor" json:"executor" mapstructure:"executor"` //
} }
type Leaf struct { type Leaf struct {
Addr string `yaml:"addr" json:"addr"` // eg http://leaf.qitu Addr string `yaml:"addr" json:"addr" mapstructure:"addr"` // eg http://leaf.qitu
ShowLog bool `yaml:"showLog" json:"showLog"` ShowLog bool `yaml:"showLog" json:"showLog" mapstructure:"showLog"`
RetryCount int `yaml:"retryCount" json:"retryCount"` RetryCount int `yaml:"retryCount" json:"retryCount" mapstructure:"retryCount"`
} }
type CronJob struct { type CronJob struct {
Name string `yaml:"name" json:"name"` Name string `yaml:"name" json:"name" mapstructure:"name"`
TimeSpec string `yaml:"timeSpec" json:"timeSpec"` TimeSpec string `yaml:"timeSpec" json:"timeSpec" mapstructure:"timeSpec"`
IsRunOnce bool ` yaml:"isRunOnce" json:"isRunOnce"` // if the task is only run once IsRunOnce bool `yaml:"isRunOnce" json:"isRunOnce" mapstructure:"isRunOnce"` // if the task is only run once
Enable bool `yaml:"enable" json:"enable"` Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
Args string `yaml:"args" json:"args"` Args string `yaml:"args" json:"args" mapstructure:"args"`
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论