node

package
v1.3.6-beta5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeBase

type NodeBase struct {
	NodeType      spec.NodeType
	NodeId        string
	WebServerPort string
	ExternalIp    string

	// 脚本执行引擎
	ScriptExecutor *yak.ScriptEngine
	// contains filtered or unexported fields
}

func NewNodeBase

func NewNodeBase(nodeType spec.NodeType, exchange, id string, token string, configs ...mq.BrokerConfigHandler) (*NodeBase, error)

func (*NodeBase) CreateAlertScriptRuntimeMessage

func (n *NodeBase) CreateAlertScriptRuntimeMessage(taskId, msg string) *spec.ScriptRuntimeMessage

func (*NodeBase) CreateFailedScriptRuntimeMessage

func (n *NodeBase) CreateFailedScriptRuntimeMessage(taskId, msg string) *spec.ScriptRuntimeMessage

func (*NodeBase) CreateFinishedScriptRuntimeMessage

func (n *NodeBase) CreateFinishedScriptRuntimeMessage(taskId, msg string) *spec.ScriptRuntimeMessage

func (*NodeBase) CreateLogScriptRuntimeMessage

func (n *NodeBase) CreateLogScriptRuntimeMessage(taskId, msg string) *spec.ScriptRuntimeMessage

func (*NodeBase) CreateOutputScriptRuntimeMessage

func (n *NodeBase) CreateOutputScriptRuntimeMessage(taskId, msg string) *spec.ScriptRuntimeMessage

func (*NodeBase) DoConfigure

func (n *NodeBase) DoConfigure(configs ...mq.BrokerConfigHandler)

func (*NodeBase) GetRPCClient

func (n *NodeBase) GetRPCClient() *mq.RPCClient

func (*NodeBase) GetRPCServer

func (n *NodeBase) GetRPCServer() *mq.RPCServer

func (*NodeBase) GetRootContext

func (n *NodeBase) GetRootContext() context.Context

func (*NodeBase) GetToken

func (n *NodeBase) GetToken() string

func (*NodeBase) HookAfterRegisteringFinished

func (n *NodeBase) HookAfterRegisteringFinished(fs ...func())

func (*NodeBase) HookOnNotificationComingHandler

func (n *NodeBase) HookOnNotificationComingHandler(f ...func(msg *amqp.Delivery))

func (*NodeBase) IsRegistered

func (n *NodeBase) IsRegistered() bool

func (*NodeBase) NewBaseMessage

func (n *NodeBase) NewBaseMessage(typeInfo spec.MessageType) *spec.Message

func (*NodeBase) Notify

func (n *NodeBase) Notify(key string, msg *spec.Message)

func (*NodeBase) NotifyHeartbeat

func (n *NodeBase) NotifyHeartbeat(key string, msg *spec.Message)

func (*NodeBase) RegisterTickerFunc

func (n *NodeBase) RegisterTickerFunc(name string, intervalSec int, first bool, f func()) error

func (*NodeBase) Serve

func (n *NodeBase) Serve()

func (*NodeBase) Shutdown

func (n *NodeBase) Shutdown()

func (*NodeBase) UnregisterTickerFunc

func (n *NodeBase) UnregisterTickerFunc(name string)

func (*NodeBase) WalkTickerFunc

func (n *NodeBase) WalkTickerFunc(cb func(name string, f *tickerFunc))

func (*NodeBase) WithCancelContext

func (n *NodeBase) WithCancelContext() (context.Context, context.CancelFunc)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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