ground

package
v0.0.0-...-e449b39 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TowerRunning_HTML_header = `` /* 161-byte string literal not displayed */

	TowerRunning_HTML_row = `` /* 877-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Ground

type Ground struct {
	DoClose func() `prettystring:"hide"`

	RecvStat *actpersec.ActPerSec `prettystring:"simple"`
	SendStat *actpersec.ActPerSec `prettystring:"simple"`
	// contains filtered or unexported fields
}

func New

func New(config *groundconfig.GroundConfig) *Ground

func (*Ground) AddActiveObj2HighScoreAndSort

func (grd *Ground) AddActiveObj2HighScoreAndSort(aos *aoscore.ActiveObjScore)

func (*Ground) BuildDate

func (grd *Ground) BuildDate() time.Time

func (*Ground) ControlTower

func (grd *Ground) ControlTower(te *TowerRunning, cmd string) error

ControlTower control tower process cmd : start,stop,restart,forcestart,logreopen (default "start")

func (*Ground) GetConfig

func (grd *Ground) GetConfig() *groundconfig.GroundConfig

func (*Ground) GetLogger

func (grd *Ground) GetLogger() interface{}

func (*Ground) GetServiceInfo

func (grd *Ground) GetServiceInfo() c2t_obj.ServiceInfo

func (*Ground) GetServiceLockFilename

func (grd *Ground) GetServiceLockFilename() string

func (*Ground) GetTowerManager

func (grd *Ground) GetTowerManager() *TowerManager

func (*Ground) NumGoroutine

func (grd *Ground) NumGoroutine() int

func (*Ground) ServiceCleanup

func (grd *Ground) ServiceCleanup()

func (*Ground) ServiceInit

func (grd *Ground) ServiceInit() error

func (*Ground) ServiceMain

func (grd *Ground) ServiceMain(mainctx context.Context)

func (*Ground) String

func (grd *Ground) String() string

func (*Ground) StringForm

func (grd *Ground) StringForm() string

type TowerManager

type TowerManager struct {
	// contains filtered or unexported fields
}

func NewTowerManager

func NewTowerManager(
	sconfig *groundconfig.GroundConfig,
	l *g2log.LogBase,
	towerdatalist []towerdata.TowerData,
) *TowerManager

func (*TowerManager) GetAutoStartTowerList

func (tm *TowerManager) GetAutoStartTowerList() []*TowerRunning

func (*TowerManager) GetByTowerName

func (tm *TowerManager) GetByTowerName(name string) *TowerRunning

func (*TowerManager) GetByTowerUUID

func (tm *TowerManager) GetByTowerUUID(id string) *TowerRunning

func (*TowerManager) GetTowerList

func (tm *TowerManager) GetTowerList() []*TowerRunning

func (*TowerManager) Heartbeat

func (tm *TowerManager) Heartbeat(req *t2g_obj.ReqHeartbeat_data) error

func (*TowerManager) MakeTowerListJSON4Client

func (tm *TowerManager) MakeTowerListJSON4Client() []towerlist4client.TowerInfo2Enter

func (*TowerManager) Register

func (tm *TowerManager) Register(req *t2g_obj.ReqRegister_data) error

func (*TowerManager) Web_TowerInfo

func (tm *TowerManager) Web_TowerInfo(w http.ResponseWriter, r *http.Request)

type TowerRunning

type TowerRunning struct {
	ConnectURL      string
	TowerConfigMade towerconfig.TowerConfig

	StartTime       time.Time `prettystring:"simple"`
	TowerInfo       c2t_obj.TowerInfo
	ServiceInfo     c2t_obj.ServiceInfo
	TowerConfigRecv towerconfig.TowerConfig
	AdminURL        string
	ServiceURL      string

	LastPing   time.Time `prettystring:"simple"`
	StatusInfo []string
	// contains filtered or unexported fields
}

func (*TowerRunning) Heartbeat

func (tw *TowerRunning) Heartbeat(req *t2g_obj.ReqHeartbeat_data)

func (*TowerRunning) IsAlive

func (tw *TowerRunning) IsAlive() bool

func (*TowerRunning) IsConfigSame

func (tw *TowerRunning) IsConfigSame() bool

func (*TowerRunning) IsPing

func (tw *TowerRunning) IsPing() bool

func (*TowerRunning) MakeTowerConfigDownURL

func (tw *TowerRunning) MakeTowerConfigDownURL() string

func (*TowerRunning) Register

func (tw *TowerRunning) Register(
	sconfig *groundconfig.GroundConfig, req *t2g_obj.ReqRegister_data)

func (*TowerRunning) Web_Info

func (tw *TowerRunning) Web_Info(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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