Documentation ¶
Index ¶
- func InitFlowEngine(flowEngine *Engine, initContext plugin.InitContext) error
- type CombineNotifyContext
- type ContextKey
- type Engine
- func (e *Engine) AsyncGetQuota(request *model.QuotaRequestImpl) (*model.QuotaFutureImpl, error)
- func (e *Engine) Destroy() error
- func (e *Engine) FlowQuotaAssistant() *quota.FlowQuotaAssistant
- func (e *Engine) GetContext() model.ValueContext
- func (e *Engine) InitCalleeService(req *model.InitCalleeServiceRequest) error
- func (e *Engine) LoadFlowRouteChain() error
- func (e *Engine) PluginSupplier() plugin.Supplier
- func (e *Engine) ScheduleTask(task *model.PeriodicTask) (chan<- *model.PriorityTask, model.TaskValues)
- func (e *Engine) ServiceEventCallback(event *common.PluginEvent) error
- func (e *Engine) Start() error
- func (e *Engine) SyncDeregister(instance *model.InstanceDeRegisterRequest) error
- func (e *Engine) SyncGetAllInstances(req *model.GetAllInstancesRequest) (*model.InstancesResponse, error)
- func (e *Engine) SyncGetInstances(req *model.GetInstancesRequest) (*model.InstancesResponse, error)
- func (e *Engine) SyncGetMesh(eventType model.EventType, req *model.GetMeshRequest) (*model.MeshResponse, error)
- func (e *Engine) SyncGetMeshConfig(eventType model.EventType, req *model.GetMeshConfigRequest) (*model.MeshConfigResponse, error)
- func (e *Engine) SyncGetOneInstance(req *model.GetOneInstanceRequest) (*model.OneInstanceResponse, error)
- func (e *Engine) SyncGetResources(req model.CacheValueQuery) error
- func (e *Engine) SyncGetServiceRule(eventType model.EventType, req *model.GetServiceRuleRequest) (*model.ServiceRuleResponse, error)
- func (e *Engine) SyncGetServices(eventType model.EventType, req *model.GetServicesRequest) (*model.ServicesResponse, error)
- func (e *Engine) SyncHeartbeat(instance *model.InstanceHeartbeatRequest) error
- func (e *Engine) SyncRegister(instance *model.InstanceRegisterRequest) (*model.InstanceRegisterResponse, error)
- func (e *Engine) SyncReportStat(typ model.MetricType, stat model.InstanceGauge) error
- func (e *Engine) SyncUpdateServiceCallResult(result *model.ServiceCallResult) error
- func (e *Engine) WatchService(req *model.WatchServiceRequest) (*model.WatchServiceResponse, error)
- type SingleNotifyContext
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 (c *CombineNotifyContext) Errs() map[ContextKey]model.SDKError
获取错误信息集合
type ContextKey ¶
type ContextKey struct { //服务信息 ServiceKey *model.ServiceKey //操作信息 Operation string }
上下文标识
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) 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) 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) 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 ¶
func (e *Engine) SyncRegister(instance *model.InstanceRegisterRequest) (*model.InstanceRegisterResponse, error)
*
- @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
创建回调上下文
Source Files ¶
Click to show internal directories.
Click to hide internal directories.