Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsoleSession ¶
ConsoleSession is container of console session.
type LegscContext ¶
type LegscContext struct { PidFileName string SockFileName string StatusFileName string Server string Proxy string DeviceName string Secret string UseWss bool Status *model.Status PingInterval time.Duration Interrupt chan os.Signal Restart chan interface{} SocketListener net.Listener Connection *websocket.Conn ConsoleSessions map[string]ConsoleSession }
LegscContext is global variables for through all over application.
func NewLegscContext ¶
func NewLegscContext(conf *config.Config) *LegscContext
NewLegscContext return LegscContext instance made by configs.
func (*LegscContext) SendMessage ¶
func (ctx *LegscContext) SendMessage(msg message.Message)
SendMessage sends message to server. It is not good to have this method here. But there is no other place to write this.
func (*LegscContext) UpdateStatus ¶
func (ctx *LegscContext) UpdateStatus() (err error)
UpdateStatus update legsc status file
Click to show internal directories.
Click to hide internal directories.