apps

package
v0.0.0-...-63a9e4b Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start()

func Stop

func Stop()

Types

type AppPlugin

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

func NewAppPlugin

func NewAppPlugin(model *models.TopicApp, plugin *plugin.Plugin, mainEntry plugin.Symbol) (r *AppPlugin)

func (*AppPlugin) IsCared

func (ap *AppPlugin) IsCared(event v10.GlobalEvents) bool

func (*AppPlugin) IsPlugin

func (ap *AppPlugin) IsPlugin() bool

func (*AppPlugin) Model

func (ap *AppPlugin) Model() *models.TopicApp

func (*AppPlugin) Plugin

func (ap *AppPlugin) Plugin() *plugin.Plugin

func (*AppPlugin) PluginMainEntry

func (ap *AppPlugin) PluginMainEntry() plugin.Symbol

type Args

type Args struct {
	// MsgId       string `json:"mid"`
	Ge          v10.GlobalEvents `json:"ge"`
	Timestamp   time.Time        `json:"ts"`
	ConsumerTag string           `json:"ctag"`
	Body        []byte           `json:"body"`
}

type Plugin

type Plugin interface {
	Model() *models.TopicApp //
	IsPlugin() bool
	Plugin() *plugin.Plugin
	PluginMainEntry() plugin.Symbol
	IsCared(event v10.GlobalEvents) bool
}

type VxPlug

type VxPlug interface {
	OnEvent(p Plugin, args *Args) (err error)
	OnLoad() error
	OnUnload() error
}

VxPlug 一个第三方开发的 VxApp,是一个具备 apps.VxPlug 接口实现的实体。参见 demo/demo.go 的示意性实现。

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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