gin_daemon

package module
v0.0.0-...-15cf6cb Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

README

gin-daemon

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAsPlugin

func RunAsPlugin(plugin *Plugin) gin.HandlerFunc

Types

type Daemon

type Daemon struct {
	MsgChan   chan Msg
	Pid       int
	PluginPid int
	// contains filtered or unexported fields
}

Daemon process

func NewDaemon

func NewDaemon() *Daemon

func (*Daemon) IsPluginRunning

func (d *Daemon) IsPluginRunning() bool

func (*Daemon) Poll

func (d *Daemon) Poll()

func (*Daemon) Run

func (d *Daemon) Run() error

func (*Daemon) RunPlugin

func (d *Daemon) RunPlugin() error

RunPlugin run new plugin process

func (*Daemon) StopPlugin

func (d *Daemon) StopPlugin() error

StopPlugin shutdown plugin process gracefully

type Msg

type Msg struct {
	Type MsgType
	Err  error
}

type MsgType

type MsgType int
const (
	PluginError MsgType = iota + 1001
	PluginHeartBeat
)

type Plugin

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

func NewPlugin

func NewPlugin() *Plugin

func (*Plugin) Run

func (p *Plugin) Run() error

func (*Plugin) Stop

func (p *Plugin) Stop()

Directories

Path Synopsis
example
pb

Jump to

Keyboard shortcuts

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