gdb

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LISTEN = "listen"
	ACTION = "action"
)
View Source
const (
	DELAY    = "delay"
	INTERVAL = "interval"
	ORDER    = "order"
	NEXT     = "next"
	TICK     = "tick"
)
View Source
const EVENT = "event"
View Source
const GDB = "gdb"
View Source
const (
	INNER = "inner"
)
View Source
const ROUTINE = "routine"
View Source
const SIGNAL = "signal"
View Source
const (
	TASK_HASH = "task.hash"
)
View Source
const TIMER = "timer"

Variables

View Source
var Index = &ice.Context{Name: GDB, Help: "事件模块",
	Commands: map[string]*ice.Command{
		ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
			m.Cmd(nfs.SAVE, kit.Select(m.Conf(SIGNAL, kit.META_PATH), m.Conf(cli.RUNTIME, kit.Keys(cli.CONF, cli.CTX_PID))),
				m.Conf(cli.RUNTIME, kit.Keys(cli.HOST, cli.PID)))

			m.Cmd(SIGNAL, LISTEN, SIGNAL, "3", kit.MDB_NAME, "退出", cli.CMD, "exit 0")
			m.Cmd(SIGNAL, LISTEN, SIGNAL, "2", kit.MDB_NAME, "重启", cli.CMD, "exit 1")
			m.Load()
		}},
		ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
			if f, ok := m.Target().Server().(*Frame); ok {
				f.e <- true
			}
			m.Save(TIMER)
		}},
	},
}

Functions

func SignalNotify

func SignalNotify(m *ice.Message, sig int, cb func())

Types

type Frame

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

func (*Frame) Begin

func (f *Frame) Begin(m *ice.Message, arg ...string) ice.Server

func (*Frame) Close

func (f *Frame) Close(m *ice.Message, arg ...string) bool

func (*Frame) Spawn

func (f *Frame) Spawn(m *ice.Message, c *ice.Context, arg ...string) ice.Server

func (*Frame) Start

func (f *Frame) Start(m *ice.Message, arg ...string) bool

Jump to

Keyboard shortcuts

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