lib

package
v0.0.0-...-0e6f1c7 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MESSAGE_LEN = ss.MAX_SS_MSG_SIZE //200k
)

Variables

This section is empty.

Functions

func AfterReLoadConfig

func AfterReLoadConfig(pconfig *Config, old_config *FileConfig, new_config *FileConfig)

After ReLoad Config If Need Handle

func CommSet

func CommSet(pconfig *Config) bool

Comm Config Setting

func DispToLogicServ

func DispToLogicServ(pconfig *Config, pdisp *ss.MsgDisp, msg []byte)

func HandleReportCmd

func HandleReportCmd(pconfig *Config, pmsg *comm.ReportMsg)

func LocalSet

func LocalSet(pconfig *Config) bool

Local Proc Setting

func RecvDispMsg

func RecvDispMsg(pconfig *Config, pdisp *ss.MsgDisp, from int, msg []byte)

func RecvHeartBeatReq

func RecvHeartBeatReq(pconfig *Config, preq *ss.MsgHeartBeatReq, from int)

func RecvMsg

func RecvMsg(pconfig *Config) int64

func RecvReportCmd

func RecvReportCmd(arg interface{})

func ReportSyncServer

func ReportSyncServer(arg interface{})

func SendHeartBeatMsg

func SendHeartBeatMsg(arg interface{})

func SendToServ

func SendToServ(pconfig *Config, target_serv int, v interface{}) bool

@v only support []byte and *ss.SSMsg

func ServerExit

func ServerExit(pconfig *Config)

func ServerStart

func ServerStart(pconfig *Config)

Main Proc

Types

type Config

type Config struct {
	//comm
	NameSpace      string
	ProcId         int
	ProcName       string
	ConfigFile     string
	Daemon         bool
	FileConfig     *FileConfig
	Comm           *comm.CommConfig
	ReportCmd      string //used for report cmd
	ReportCmdToken int64
	ReportServ     *comm.ReportServ //report to manger

}

type FileConfig

type FileConfig struct {
	LogicServList []int    `json:"logic_serv_list"`
	LogFile       string   `json:"log_file"`
	ManageAddr    []string `json:"manage_addr"`
	MonitorInv    int      `json:"monitor_inv"` //monitor interval seconds
}

type Msg

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

Jump to

Keyboard shortcuts

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