Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRemote ¶ added in v0.1.1
Types ¶
type CORSConfig ¶
type CertConfig ¶
type Config ¶
type Config struct { DB DBConfig `mapstructure:"db"` // DB 数据库连接配置 Service ServerConfig `mapstructure:"service"` // Service 服务配置 Gateway GatewayConfig `mapstructure:"gateway"` Cert CertConfig `mapstructure:"sign"` // Cert JWT 使用RSA的密钥配置 }
type DBConfig ¶
type EndPoint ¶
type EndPoint struct { Name string `mapstructure:"name"` Addr string `mapstructure:"addr"` TTL int `mapstructure:"ttl"` Network string `mapstructure:"network"` TLS bool `mapstructure:"tls"` // 是否使用证TLS证书 KeyFile string `mapstructure:"key"` // 私钥文件 CertFile string `mapstructure:"cert"` // 公钥文件 CAFile string `mapstructure:"ca"` // Ca文件 }
func DefaultEndPoint ¶
func DefaultEndPoint() *EndPoint
func NewEndpoint ¶
func (*EndPoint) LocalListener ¶
自动获取本机的ip以及端口号,ip:port格式
func (*EndPoint) SetDefault ¶
func (cfg *EndPoint) SetDefault()
type GatewayConfig ¶
type GatewayConfig struct { Name string `mapstructure:"name"` EndPoint *EndPoint `mapstructure:"endpoint"` Transports []*EndPoint `mapstructure:"trans"` RegistryAddrs []string `mapstructure:"registry"` CORS *CORSConfig `mapstructure:"cors"` }
type ServerConfig ¶
Click to show internal directories.
Click to hide internal directories.