config

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(args []string) error

Types

type Auth

type Auth struct {
	Allows []string `toml:"allows"`
}

type Broker

type Broker struct {
	TcpAddr     string `toml:"tcpAddr"`
	TcpTLSOpen  bool   `toml:"tcpTlsOpen"`
	WsAddr      string `toml:"wsAddr"`
	WsPath      string `toml:"wsPath"`
	WssAddr     string `toml:"wssAddr"`
	WssCertPath string `toml:"wssCertPath"`
	WssKeyPath  string `toml:"wssKeyPath"`
	Ca          string `toml:"ca"`
}

type Cluster

type Cluster struct {
	Enabled             bool       `toml:"enabled"`
	TaskClusterPoolSize int32      `toml:"taskClusterPoolSize"`
	TaskServicePoolSize int32      `toml:"taskServicePoolSize"`
	ClusterName         string     `toml:"clusterName"`
	ClusterHost         string     `toml:"clusterHost"`
	ClusterPort         int        `toml:"clusterPort"`
	ClusterTLS          bool       `toml:"clusterTls"`
	ServerCertFile      string     `toml:"serverCertFile"`
	ServerKeyFile       string     `toml:"serverKeyFile"`
	ClientCertFile      string     `toml:"clientCertFile"`
	ClientKeyFile       string     `toml:"clientKeyFile"`
	StaticNodeList      []NodeInfo `toml:"staticNodeList"`
}

type Connect

type Connect struct {
	Keepalive      int `toml:"keepalive"`
	WriteTimeout   int `toml:"writeTimeout"`
	ConnectTimeout int `toml:"connectTimeout"`
	AckTimeout     int `toml:"ackTimeout"`
	TimeoutRetries int `toml:"timeOutRetries"`
}

type DefaultConfig

type DefaultConfig struct {
	Connect  Connect  `toml:"connect"`
	Provider Provider `toml:"provider"`
	Auth     Auth     `toml:"auth"`
	Server   Server   `toml:"server"`
}

type Log

type Log struct {
	Level string `toml:"level"`
}

type Mysql

type Mysql struct {
	Source   string `toml:"source"`
	PoolSize int    `toml:"poolSize"`
}

type NodeInfo

type NodeInfo struct {
	Name string `toml:"name"`
	Addr string `toml:"addr"`
}

type PProf

type PProf struct {
	Open bool  `toml:"open"`
	Port int64 `toml:"port"`
}

type Provider

type Provider struct {
	SessionsProvider string `toml:"sessionsProvider"`
	TopicsProvider   string `toml:"topicsProvider"`
	Authenticator    string `toml:"authenticator"`
}

type Redis

type Redis struct {
	Source   string `toml:"source"`
	Db       int    `toml:"db"`
	PoolSize int    `toml:"poolSize"`
}

type SIConfig

type SIConfig struct {
	ServerVersion string        `toml:"serverVersion"`
	Log           Log           `toml:"log"`
	Broker        Broker        `toml:"broker"`
	Cluster       Cluster       `toml:"cluster"`
	DefaultConfig DefaultConfig `toml:"defaultConfig"`
	Store         Store         `toml:"store"`
	PProf         PProf         `toml:"pprof"`
}

func GetConfig

func GetConfig() SIConfig

copy一份返回即可

func (*SIConfig) String

func (conf *SIConfig) String() string

type Server

type Server struct {
	Redirects         []string `tome:"redirects"`
	RedirectOpen      bool     `tome:"redirectOpen"`
	RedirectIsForEver bool     `tome:"redirectIsForEver"`
}

type Store

type Store struct {
	Mysql Mysql `toml:"mysql"`
	Redis Redis `toml:"redis"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL