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) ProcessLoadBalance(req *model.ProcessLoadBalanceRequest) (*model.OneInstanceResponse, error)
- func (e *Engine) ProcessRouters(req *model.ProcessRoutersRequest) (*model.InstancesResponse, error)
- 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) SyncGetConfigFile(namespace, fileGroup, fileName string) (model.ConfigFile, error)
- func (e *Engine) SyncGetInstances(req *model.GetInstancesRequest) (*model.InstancesResponse, 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) SyncRegisterV2(request *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
}
CombineNotifyContext 复合的回调上下文,等待所有的子回调都返回才会触发回调
func NewCombineNotifyContext ¶
func NewCombineNotifyContext(svcKey *model.ServiceKey, notifiers []*SingleNotifyContext) *CombineNotifyContext
NewCombineNotifyContext 创建复合回调上下文
func (*CombineNotifyContext) Errs ¶
func (c *CombineNotifyContext) Errs() map[ContextKey]model.SDKError
Errs 获取错误信息集合
type ContextKey ¶
type ContextKey struct { // 服务信息 ServiceKey *model.ServiceKey // 操作信息 Operation string }
ContextKey 上下文标识
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine 编排调度引擎,API相关逻辑在这里执行
func (*Engine) AsyncGetQuota ¶
func (e *Engine) AsyncGetQuota(request *model.QuotaRequestImpl) (*model.QuotaFutureImpl, error)
AsyncGetQuota 异步获取配额信息
func (*Engine) FlowQuotaAssistant ¶
func (e *Engine) FlowQuotaAssistant() *quota.FlowQuotaAssistant
FlowQuotaAssistant 获取流程辅助类
func (*Engine) InitCalleeService ¶
func (e *Engine) InitCalleeService(req *model.InitCalleeServiceRequest) error
InitCalleeService 初始化服务运行中需要的被调服务
func (*Engine) LoadFlowRouteChain ¶
LoadFlowRouteChain 加载服务路由链插件
func (*Engine) PluginSupplier ¶
PluginSupplier 获取插件工厂
func (*Engine) ProcessLoadBalance ¶ added in v1.2.0
func (e *Engine) ProcessLoadBalance(req *model.ProcessLoadBalanceRequest) (*model.OneInstanceResponse, error)
ProcessLoadBalance 执行负载均衡策略,返回负载均衡后的实例
func (*Engine) ProcessRouters ¶ added in v1.2.0
func (e *Engine) ProcessRouters(req *model.ProcessRoutersRequest) (*model.InstancesResponse, error)
ProcessRouters 执行路由链过滤,返回经过路由后的实例列表
func (*Engine) ScheduleTask ¶
func (e *Engine) ScheduleTask(task *model.PeriodicTask) (chan<- *model.PriorityTask, model.TaskValues)
ScheduleTask 调度任务
func (*Engine) ServiceEventCallback ¶
func (e *Engine) ServiceEventCallback(event *common.PluginEvent) error
ServiceEventCallback serviceUpdate消息订阅回调
func (*Engine) SyncDeregister ¶
func (e *Engine) SyncDeregister(instance *model.InstanceDeRegisterRequest) error
SyncDeregister 同步进行服务反注册
func (*Engine) SyncGetAllInstances ¶
func (e *Engine) SyncGetAllInstances(req *model.GetAllInstancesRequest) (*model.InstancesResponse, error)
SyncGetAllInstances 同步获取服务实例
func (*Engine) SyncGetConfigFile ¶ added in v1.1.0
func (e *Engine) SyncGetConfigFile(namespace, fileGroup, fileName string) (model.ConfigFile, error)
SyncGetConfigFile 同步获取配置文件
func (*Engine) SyncGetInstances ¶
func (e *Engine) SyncGetInstances(req *model.GetInstancesRequest) (*model.InstancesResponse, error)
SyncGetInstances 同步获取服务实例
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
SyncGetResources 同步加载资源
func (*Engine) SyncGetServiceRule ¶
func (e *Engine) SyncGetServiceRule( eventType model.EventType, req *model.GetServiceRuleRequest) (*model.ServiceRuleResponse, error)
SyncGetServiceRule 同步获取服务规则
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
SyncHeartbeat 同步进行心跳上报
func (*Engine) SyncRegister ¶
func (e *Engine) SyncRegister(instance *model.InstanceRegisterRequest) (*model.InstanceRegisterResponse, error)
SyncRegister 同步进行服务注册
func (*Engine) SyncRegisterV2 ¶ added in v1.2.0
func (e *Engine) SyncRegisterV2(request *model.InstanceRegisterRequest) (*model.InstanceRegisterResponse, error)
SyncRegisterV2 async-regis
func (*Engine) SyncReportStat ¶
func (e *Engine) SyncReportStat(typ model.MetricType, stat model.InstanceGauge) error
SyncReportStat 上报统计数据到统计插件中
func (*Engine) SyncUpdateServiceCallResult ¶
func (e *Engine) SyncUpdateServiceCallResult(result *model.ServiceCallResult) error
SyncUpdateServiceCallResult 同步上报调用结果信息
func (*Engine) WatchService ¶
func (e *Engine) WatchService(req *model.WatchServiceRequest) (*model.WatchServiceResponse, error)
WatchService watch service
type SingleNotifyContext ¶
type SingleNotifyContext struct {
// contains filtered or unexported fields
}
SingleNotifyContext 同步调用回调上下文
func NewSingleNotifyContext ¶
func NewSingleNotifyContext(name *ContextKey, notifier *common.Notifier) *SingleNotifyContext
NewSingleNotifyContext 创建回调上下文
func (*SingleNotifyContext) Err ¶
func (s *SingleNotifyContext) Err() model.SDKError
Err 返回异常信息返回异常信息