flow

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFlowEngine

func InitFlowEngine(flowEngine *Engine, initContext plugin.InitContext) error

InitFlowEngine 初始化flowEngine实例

Types

type CombineNotifyContext

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

复合的回调上下文,等待所有的子回调都返回才会触发回调

func NewCombineNotifyContext

func NewCombineNotifyContext(svcKey *model.ServiceKey, notifiers []*SingleNotifyContext) *CombineNotifyContext

创建复合回调上下文

func (*CombineNotifyContext) Errs

获取错误信息集合

func (*CombineNotifyContext) IsDone

func (c *CombineNotifyContext) IsDone() bool

是否已经完成

func (*CombineNotifyContext) Wait

func (c *CombineNotifyContext) Wait(timeout time.Duration) (exceedTime bool)

notify 异步任务执行回调函数 返回值,是否超时

type ContextKey

type ContextKey struct {
	//服务信息
	ServiceKey *model.ServiceKey
	//操作信息
	Operation string
}

上下文标识

func (ContextKey) String

func (c ContextKey) String() string

ToString方法

type Engine

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

*

  • @brief 编排调度引擎,API相关逻辑在这里执行

func (*Engine) AsyncGetQuota

func (e *Engine) AsyncGetQuota(request *model.QuotaRequestImpl) (*model.QuotaFutureImpl, error)

同步获取配额信息

func (*Engine) Destroy

func (e *Engine) Destroy() error

Destroy 销毁流程引擎

func (*Engine) FlowQuotaAssistant

func (e *Engine) FlowQuotaAssistant() *quota.FlowQuotaAssistant

获取流程辅助类

func (*Engine) GetContext

func (e *Engine) GetContext() model.ValueContext

func (*Engine) InitCalleeService

func (e *Engine) InitCalleeService(req *model.InitCalleeServiceRequest) error

初始化服务运行中需要的被调服务

func (*Engine) LoadFlowRouteChain

func (e *Engine) LoadFlowRouteChain() error

加载服务路由链插件

func (*Engine) PluginSupplier

func (e *Engine) PluginSupplier() plugin.Supplier

获取插件工厂

func (*Engine) ScheduleTask

func (e *Engine) ScheduleTask(task *model.PeriodicTask) (chan<- *model.PriorityTask, model.TaskValues)

调度任务

func (*Engine) ServiceEventCallback

func (e *Engine) ServiceEventCallback(event *common.PluginEvent) error

serviceUpdate消息订阅回调

func (*Engine) Start

func (e *Engine) Start() error

启动引擎

func (*Engine) SyncDeregister

func (e *Engine) SyncDeregister(instance *model.InstanceDeRegisterRequest) error

*

  • @brief 同步进行服务反注册

func (*Engine) SyncGetAllInstances

func (e *Engine) SyncGetAllInstances(req *model.GetAllInstancesRequest) (*model.InstancesResponse, error)

SyncGetInstances 同步获取服务实例

func (*Engine) SyncGetInstances

func (e *Engine) SyncGetInstances(req *model.GetInstancesRequest) (*model.InstancesResponse, error)

SyncGetInstances 同步获取服务实例

func (*Engine) SyncGetMesh

func (e *Engine) SyncGetMesh(eventType model.EventType,
	req *model.GetMeshRequest) (*model.MeshResponse, error)

同步获取网格

func (*Engine) SyncGetMeshConfig

func (e *Engine) SyncGetMeshConfig(eventType model.EventType,
	req *model.GetMeshConfigRequest) (*model.MeshConfigResponse, error)

SyncGetMeshConfig

func (*Engine) SyncGetOneInstance

func (e *Engine) SyncGetOneInstance(req *model.GetOneInstanceRequest) (*model.OneInstanceResponse, error)

SyncGetOneInstance 同步获取服务实例

func (*Engine) SyncGetResources

func (e *Engine) SyncGetResources(req model.CacheValueQuery) error

同步加载资源

func (*Engine) SyncGetServiceRule

func (e *Engine) SyncGetServiceRule(
	eventType model.EventType, req *model.GetServiceRuleRequest) (*model.ServiceRuleResponse, error)

同步获取服务规则

func (*Engine) SyncGetServices

func (e *Engine) SyncGetServices(eventType model.EventType,
	req *model.GetServicesRequest) (*model.ServicesResponse, error)

SyncGetServices

func (*Engine) SyncHeartbeat

func (e *Engine) SyncHeartbeat(instance *model.InstanceHeartbeatRequest) error

*

  • @brief 同步进行心跳上报

func (*Engine) SyncRegister

*

  • @brief 同步进行服务注册

func (*Engine) SyncReportStat

func (e *Engine) SyncReportStat(typ model.MetricType, stat model.InstanceGauge) error

上报统计数据到统计插件中

func (*Engine) SyncUpdateServiceCallResult

func (e *Engine) SyncUpdateServiceCallResult(result *model.ServiceCallResult) error

*

  • @brief 同步上报调用结果信息

func (*Engine) WatchService

func (e *Engine) WatchService(req *model.WatchServiceRequest) (*model.WatchServiceResponse, error)

watch service

type SingleNotifyContext

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

同步调用回调上下文

func NewSingleNotifyContext

func NewSingleNotifyContext(name *ContextKey, notifier *common.Notifier) *SingleNotifyContext

创建回调上下文

func (*SingleNotifyContext) Err

返回异常信息

func (*SingleNotifyContext) Wait

func (s *SingleNotifyContext) Wait(timeout time.Duration) bool

notify 异步任务执行回调函数

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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