services

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = "gateway-go.yaml"
View Source
const GRpcAddr = ""
View Source
const GrpcPort = 0
View Source
const IoTManagerAddr = "api.iot-manager.iothub.cloud:8881"

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: make(map[string]string),
}
View Source
var GatewayLoginToken = ""
View Source
var GatewayManager = &GatewayCtl{serverSession: make(map[string]*ServerSession)}

Functions

func InitConfigFile added in v0.1.99

func InitConfigFile()

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) DelServer added in v0.2.0

func (gm *GatewayCtl) DelServer(runid 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 {
	// 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