services

package
v0.1.99 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

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 LoginServer(tokenstr string) (*yamux.Session, error)

func LoginWorkConn

func LoginWorkConn(token *models.TokenClaims, tokenStr string) (net.Conn, error)

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

type ServerSession struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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()

Jump to

Keyboard shortcuts

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