Documentation ¶
Index ¶
- Constants
- Variables
- func InitConfigFile()
- func LoginServer(tokenstr string) (*yamux.Session, error)
- func LoginWorkConn(token *models.TokenClaims, tokenStr string) (net.Conn, error)
- func UseConfigFile()
- func UseGateWayToken()
- func WriteConfigFile(ConfigMode *models.GatewayConfig, path string) (err error)
- type GatewayCtl
- type ServerSession
Constants ¶
View Source
const ConfigFileName = "gateway-go.yaml"
View Source
const GRpcAddr = ""
View Source
const GrpcPort = 0
Variables ¶
View Source
var ConfigFilePath = fmt.Sprintf("%s%s", "./", ConfigFileName)
View Source
var ConfigMode = &models.GatewayConfig{ GatewayUUID: uuid.Must(uuid.NewV4()).String(), LogConfig: &models.LogConfig{ EnableStdout: true, LogFilePath: "", }, LoginWithTokenMap: map[string]string{}, }
View Source
var GatewayLoginToken = ""
View Source
var GatewayManager = &GatewayCtl{serverSession: make(map[string]*ServerSession)}
View Source
var (
Version = "dev"
)
Functions ¶
func InitConfigFile ¶ added in v0.1.99
func InitConfigFile()
func LoginServer ¶ added in v0.1.83
func LoginWorkConn ¶
func UseConfigFile ¶ added in v0.1.99
func UseConfigFile()
func UseGateWayToken ¶ added in v0.1.99
func UseGateWayToken()
func WriteConfigFile ¶ added in v0.1.99
func WriteConfigFile(ConfigMode *models.GatewayConfig, path string) (err error)
将配置写入指定的路径的文件
Types ¶
type GatewayCtl ¶ added in v0.1.83
type GatewayCtl struct {
// contains filtered or unexported fields
}
func (*GatewayCtl) AddServer ¶ added in v0.1.83
func (gm *GatewayCtl) AddServer(token string) (err error)
func (*GatewayCtl) Loged ¶ added in v0.1.98
func (gm *GatewayCtl) Loged() bool
type ServerSession ¶ added in v0.1.83
func (*ServerSession) CheckSessionStatus ¶ added in v0.1.83
func (ss *ServerSession) CheckSessionStatus()
func (*ServerSession) LoginServer ¶ added in v0.1.83
func (ss *ServerSession) LoginServer() (err error)
func (*ServerSession) LoopStream ¶ added in v0.1.83
func (ss *ServerSession) LoopStream()
func (*ServerSession) Task ¶ added in v0.1.83
func (ss *ServerSession) Task()
Click to show internal directories.
Click to hide internal directories.