Documentation ¶
Index ¶
- Variables
- func GetHostName(hostName string) string
- func InitCfg()
- type Action
- type Agent
- type App
- type AppLog
- type AppLogAliyun
- type AppLogCustomize
- type Assist
- type Auth
- type Casbin
- type ClientProxy
- type Configure
- type Database
- type Etcd
- type Gateway
- type GrafanaProxy
- type GrpcTest
- type HTTPProxy
- type HeartBeat
- type HttpRouter
- type Logger
- type LoggerInfo
- type MultiProxy
- type Pprof
- type ProxyStream
- type Register
- type Server
- type ServerProxy
- type ServerSchema
- type SingleProxy
- type TLS
Constants ¶
This section is empty.
Variables ¶
View Source
var Cfg cfg
Cfg ..
Functions ¶
Types ¶
type AppLog ¶ added in v0.3.0
type AppLog struct { Mode string Aliyun AppLogAliyun Customize AppLogCustomize }
AppLog ..
type AppLogAliyun ¶ added in v0.3.0
type AppLogAliyun struct { Enable bool Key string Secret string RoleArn string RoleSessionName string RegionID string `json:"regionId" toml:"regionId"` LoginURL string `json:"loginUrl" toml:"loginUrl"` }
AppLogAliyun ...
type AppLogCustomize ¶ added in v0.3.0
type Auth ¶
type Auth struct { // Auth LoginCookieName string LoginMaximumInactiveLifetimeDays int LoginMaximumLifetimeDays int TokenRotationIntervalMinutes int DisableLoginForm bool DisableSignoutMenu bool SignoutRedirectUrl string OauthAutoLogin bool OauthStateCookieMaxAge int ApiKeyMaxSecondsToLive int }
Auth ...
type Casbin ¶
type Casbin struct { Enable bool Debug bool Model string AutoLoad bool AutoLoadInternal int ResourceFile string }
Casbin ..
type ClientProxy ¶
type ClientProxy struct { HttpRouter HttpRouter SingleProxy SingleProxy MultiProxy []MultiProxy }
type Configure ¶
type Configure struct { Dirs []string `json:"dirs"` Prefixes []string `json:"prefixes"` Agent struct { Port int `json:"port"` } `json:"agent"` }
Configure ..
type Database ¶
type Database struct { Enable bool // DSN地址: mysql://root:secret@tcp(127.0.0.1:3307)/mysql?timeout=20s&readTimeout=20s DSN string `json:"dsn" toml:"dsn"` // Debug开关 Debug bool `json:"debug" toml:"debug"` // 最大空闲连接数 MaxIdleConns int `json:"maxIdleConns" toml:"maxIdleConns"` // 最大活动连接数 MaxOpenConns int `json:"maxOpenConns" toml:"maxOpenConns"` // 连接的最大存活时间 ConnMaxLifetime time.Duration `json:"connMaxLifetime" toml:"connMaxLifetime"` // 创建连接的错误级别,=panic时,如果创建失败,立即panic OnDialError string `json:"level" toml:"level"` // 慢日志阈值 SlowThreshold time.Duration `json:"slowThreshold" toml:"slowThreshold"` // 拨超时时间 DialTimeout time.Duration `json:"dialTimeout" toml:"dialTimeout"` // 关闭指标采集 DisableMetric bool `json:"disableMetric" toml:"disableMetric"` // 关闭链路追踪 DisableTrace bool `json:"disableTrace" toml:"disableTrace"` }
type Etcd ¶
type Etcd struct { Enable bool `json:"enable"` ListenAddr string `json:"listenAddr"` Endpoints []string `json:"endpoints"` Namespace string `json:"namespace"` Timeout time.Duration `json:"timeout"` TLS TLS `json:"tls"` BasicAuth bool `json:"basicAuth"` Password string `json:"password"` UserName string `json:"userName"` }
Etcd ..
type GrafanaProxy ¶
type HTTPProxy ¶
type HTTPProxy struct { Enable bool ListenAddr string Scheme string Backend string DisableKeepAlives bool MaxIdleConns int MaxIdelPerHost int Timeout int }
HTTPProxy ..
type HeartBeat ¶
type HeartBeat struct { Enable bool `json:"enable"` Debug bool `json:"debug"` Addr string `json:"addr"` Internal time.Duration `json:"internal"` HostName string `json:"host_name"` RegionCode string `json:"region_code"` RegionName string `json:"region_name"` ZoneCode string `json:"zone_code"` ZoneName string `json:"zone_name"` Env string `json:"env"` }
type HttpRouter ¶
type HttpRouter struct {
GovernConfig string
}
type Logger ¶
type Logger struct { Biz LoggerInfo System LoggerInfo }
type LoggerInfo ¶
type MultiProxy ¶
type MultiProxy struct { Env string ZoneCode string Stream ProxyStream HTTP HTTPProxy Etcd Etcd }
MultiProxy ..
type ProxyStream ¶
type ServerProxy ¶
type ServerProxy struct { Name string Stream ProxyStream HTTPServer ServerSchema GrpcServer ServerSchema GovernServer ServerSchema HeartBeat HeartBeat Etcd Etcd Prometheus HTTPProxy }
ServerProxy ..
type ServerSchema ¶
Click to show internal directories.
Click to hide internal directories.