Documentation ¶
Overview ¶
Package endpoints 定义所有的 route handle.
Index ¶
- type Endpoints
- func (e *Endpoints) AddonConfigCallback(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) AddonCreateCallback(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) AddonDeleteCallback(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) AddonLogs(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) AddonMetrics(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) AddonYmlExport(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) AddonYmlImport(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CancelDeployment(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CleanUnusedMigrationNs() (bool, error)
- func (e *Endpoints) CreateAddonDirectly(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateAddonTenant(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateCustomAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateRuntimeByRelease(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateRuntimeByReleaseAction(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeleteAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeleteRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeployStagesAddons(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeployStagesDomains(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeployStagesServices(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeploymentApprove(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) FullGC(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) FullGCLoop()
- func (e *Endpoints) GetAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetAddonReferences(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetAppWorkspaceReleases(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetClusterResourceReference(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetDeploymentStatus(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetMiddleware(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetMiddlewareAddonClassification(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetMiddlewareAddonDaily(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetMiddlewareResource(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetProjectResource(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetRuntimeSpec(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) Info(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) InnerGetMiddleware(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) InstancesUsage(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) KillPod(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListAddonMenu(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListAppUsage(ctx context.Context, r *http.Request, vars map[string]string, ...) (httpserver.Responser, error)
- func (e *Endpoints) ListApprovedDeployments(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListAvailableAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListByAddonName(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListCustomAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListDeployments(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListDomains(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListExtensionAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListLaunchedApprovalDeployments(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListMicroServiceMenu(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListMicroServiceProject(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListMiddleware(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListPendingApprovalDeployments(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListProjectUsage(ctx context.Context, r *http.Request, vars map[string]string, ...) (httpserver.Responser, error)
- func (e *Endpoints) ListRuntimeUsage(ctx context.Context, r *http.Request, vars map[string]string, ...) (httpserver.Responser, error)
- func (e *Endpoints) ListRuntimes(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListServiceInstance(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListServicePod(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListServiceUsage(ctx context.Context, r *http.Request, vars map[string]string, ...) (httpserver.Responser, error)
- func (e *Endpoints) MigrationLog(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) OrgcenterJobLogs(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) PushOnDeletingRuntimes() (abort bool, err0 error)
- func (e *Endpoints) PushOnDeletingRuntimesPolling() (abort bool, err0 error)
- func (e *Endpoints) PushOnDeployment() (bool, error)
- func (e *Endpoints) PushOnDeploymentPolling() (abort bool, err0 error)
- func (e *Endpoints) RedeployRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) RedeployRuntimeAction(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ReferCluster(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) RemoveAddons() (bool, error)
- func (e *Endpoints) RestartRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) RollbackRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) RollbackRuntimeAction(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) Routes() []httpserver.Endpoint
- func (e *Endpoints) RuntimeLogs(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) StartRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) StopRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) SyncAddonReferenceNum() (bool, error)
- func (e *Endpoints) SyncAddonResources() (bool, error)
- func (e *Endpoints) SyncAddons() (bool, error)
- func (e *Endpoints) SyncDeployAddon() (bool, error)
- func (e *Endpoints) SyncProjects() (bool, error)
- func (e *Endpoints) UpdateCustomAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) UpdateDomains(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- type InstanceRequestType
- type InstanceStatusEvent
- type Option
- func WithAddon(addon *addon.Addon) Option
- func WithBundle(bdl *bundle.Bundle) Option
- func WithDBClient(db *dbclient.DBClient) Option
- func WithDeployment(deployment *deployment.Deployment) Option
- func WithDomain(domain *domain.Domain) Option
- func WithEnvEncrypt(encrypt *encryption.EnvEncrypt) Option
- func WithEventManager(evMgr *events.EventManager) Option
- func WithInstance(instance *instance.Instance) Option
- func WithMigration(migration *migration.Migration) Option
- func WithPool(pool *goroutinepool.GoroutinePool) Option
- func WithQueue(queue *queue.PusherQueue) Option
- func WithResource(resource *resource.Resource) Option
- func WithRuntime(runtime *runtime.Runtime) Option
- type RuntimeStatusEventReq
- type ServiceStatusEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoints ¶
type Endpoints struct {
// contains filtered or unexported fields
}
Endpoints 定义 endpoint 方法
func (*Endpoints) AddonConfigCallback ¶
func (e *Endpoints) AddonConfigCallback(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
AddonConfigCallback addon provider配置回调接口
func (*Endpoints) AddonCreateCallback ¶
func (e *Endpoints) AddonCreateCallback(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
AddonCreateCallback addon provider创建状态回调接口
func (*Endpoints) AddonDeleteCallback ¶
func (e *Endpoints) AddonDeleteCallback(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
AddonDeleteCallback addon provider删除状态回调接口
func (*Endpoints) AddonLogs ¶
func (e *Endpoints) AddonLogs(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
AddonLogs addon日志信息
func (*Endpoints) AddonMetrics ¶
func (e *Endpoints) AddonMetrics(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
AddonMetrics addon链路转发监控信息
func (*Endpoints) AddonYmlExport ¶
func (*Endpoints) AddonYmlImport ¶
func (*Endpoints) CancelDeployment ¶
func (e *Endpoints) CancelDeployment(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
CancelDeployment 取消部署
func (*Endpoints) CleanUnusedMigrationNs ¶
清理migration namespace
func (*Endpoints) CreateAddonDirectly ¶
func (*Endpoints) CreateAddonTenant ¶
func (*Endpoints) CreateCustomAddon ¶
func (e *Endpoints) CreateCustomAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
CreateCustomAddon 创建自定义 addon
func (*Endpoints) CreateRuntime ¶
func (e *Endpoints) CreateRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
CreateRuntime 创建应用实例
func (*Endpoints) CreateRuntimeByRelease ¶
func (e *Endpoints) CreateRuntimeByRelease(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
CreateRuntimeByRelease 通过releaseId创建runtime
func (*Endpoints) CreateRuntimeByReleaseAction ¶
func (*Endpoints) DeleteAddon ¶
func (e *Endpoints) DeleteAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
DeleteAddon 删除 addon
func (*Endpoints) DeleteRuntime ¶
func (e *Endpoints) DeleteRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
DeleteRuntime 删除应用实例
func (*Endpoints) DeployStagesAddons ¶
func (*Endpoints) DeployStagesDomains ¶
func (*Endpoints) DeployStagesServices ¶
func (*Endpoints) DeploymentApprove ¶
func (e *Endpoints) DeploymentApprove(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ApproveDeployment 审批 deployment
func (*Endpoints) FullGC ¶
func (e *Endpoints) FullGC(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
FullGC 触发全量 GC
func (*Endpoints) FullGCLoop ¶
func (e *Endpoints) FullGCLoop()
func (*Endpoints) GetAddon ¶
func (e *Endpoints) GetAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetAddon 获取 addon 详情
func (*Endpoints) GetAddonReferences ¶
func (e *Endpoints) GetAddonReferences(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetAddonReferences 获取 addon 详情的引用列表
func (*Endpoints) GetAppWorkspaceReleases ¶
func (e *Endpoints) GetAppWorkspaceReleases(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetAppWorkspaceReleases 获取应用某一环境下可部署的 releases
func (*Endpoints) GetClusterResourceReference ¶
func (e *Endpoints) GetClusterResourceReference(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
获取集群中service和addon的数量
func (*Endpoints) GetDeploymentStatus ¶
func (e *Endpoints) GetDeploymentStatus(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetDeploymentStatus 查询部署状态
func (*Endpoints) GetMiddleware ¶
func (e *Endpoints) GetMiddleware(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetMiddleware 获取 middleware 详情
func (*Endpoints) GetMiddlewareAddonClassification ¶
func (e *Endpoints) GetMiddlewareAddonClassification(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetMiddlewareAddonClassification 获取 middleware addon分类资源占用
func (*Endpoints) GetMiddlewareAddonDaily ¶
func (e *Endpoints) GetMiddlewareAddonDaily(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetMiddlewareAddonDaily 获取 middleware 每日addon资源占用
func (*Endpoints) GetMiddlewareResource ¶
func (e *Endpoints) GetMiddlewareResource(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetMiddlewareResource 获取 middleware 资源详情
func (*Endpoints) GetProjectResource ¶
func (e *Endpoints) GetProjectResource(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
获取项目资源信息,包括service和addon
func (*Endpoints) GetRuntime ¶
func (e *Endpoints) GetRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetRuntime 查询应用实例
func (*Endpoints) GetRuntimeSpec ¶
func (*Endpoints) Info ¶
func (e *Endpoints) Info(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
Info 返回 orchestrator 描述
func (*Endpoints) InnerGetMiddleware ¶
func (e *Endpoints) InnerGetMiddleware(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
InnerGetMiddleware 内部获取middleware详情
func (*Endpoints) InstancesUsage ¶
func (*Endpoints) ListAddon ¶
func (e *Endpoints) ListAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListAddon addon 列表 type=addon&value=<addonName> 按 addon 名称获取 addon 列表 type=category
func (*Endpoints) ListAddonMenu ¶
func (e *Endpoints) ListAddonMenu(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListAddonMenu addon menu 列表
func (*Endpoints) ListAppUsage ¶
func (e *Endpoints) ListAppUsage(ctx context.Context, r *http.Request, vars map[string]string, limited_app_ids []string) (httpserver.Responser, error)
ListAppUsage 获取应用维度资源使用统计
func (*Endpoints) ListApprovedDeployments ¶
func (*Endpoints) ListAvailableAddon ¶
func (e *Endpoints) ListAvailableAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListAvailableAddon dice.yml 编辑时列出可选 addon 列表
func (*Endpoints) ListByAddonName ¶
func (e *Endpoints) ListByAddonName(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListByAddonName 通过addonName来控制
func (*Endpoints) ListCustomAddon ¶
func (e *Endpoints) ListCustomAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListCustomAddon 添加第三方addon,先获取第三方addon列表
func (*Endpoints) ListDeployments ¶
func (e *Endpoints) ListDeployments(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListDeployments 查询部署列表
func (*Endpoints) ListDomains ¶
func (e *Endpoints) ListDomains(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListDomains 查询域名列表
func (*Endpoints) ListExtensionAddon ¶
func (e *Endpoints) ListExtensionAddon(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListExtensionAddon dice.yml 编辑时列出可选 extension 列表
func (*Endpoints) ListLaunchedApprovalDeployments ¶
func (e *Endpoints) ListLaunchedApprovalDeployments(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListLaunchedApprovedDeployments 列出'user-id'用户发起审批的 deployments
func (*Endpoints) ListMicroServiceMenu ¶
func (e *Endpoints) ListMicroServiceMenu(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListMicroServiceMenu 获取项目下的微服务菜单
func (*Endpoints) ListMicroServiceProject ¶
func (e *Endpoints) ListMicroServiceProject(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListMicroServiceProject 获取使用微服务的项目列表
func (*Endpoints) ListMiddleware ¶
func (e *Endpoints) ListMiddleware(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListMiddlewares 获取 addon 真实实例列表
func (*Endpoints) ListPendingApprovalDeployments ¶
func (e *Endpoints) ListPendingApprovalDeployments(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListPendingApprovalDeployments 列出待审批 deployments
func (*Endpoints) ListProjectUsage ¶
func (e *Endpoints) ListProjectUsage(ctx context.Context, r *http.Request, vars map[string]string, limited_project_ids []string) (httpserver.Responser, error)
ListProjectUsage 获取 project 资源分配列表
func (*Endpoints) ListRuntimeUsage ¶
func (e *Endpoints) ListRuntimeUsage(ctx context.Context, r *http.Request, vars map[string]string, limited_runtime_ids []string) (httpserver.Responser, error)
ListRuntimeUsage 获取 runtime 维度资源使用统计
func (*Endpoints) ListRuntimes ¶
func (e *Endpoints) ListRuntimes(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListRuntimes 查询应用实例列表
func (*Endpoints) ListServiceInstance ¶
func (e *Endpoints) ListServiceInstance(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListServiceInstance 获取runtime 下服务实例列表
func (*Endpoints) ListServicePod ¶
func (*Endpoints) ListServiceUsage ¶
func (e *Endpoints) ListServiceUsage(ctx context.Context, r *http.Request, vars map[string]string, limited_service_name []string) (httpserver.Responser, error)
ListServiceUsage 获取 service 维度资源使用统计
func (*Endpoints) MigrationLog ¶
func (e *Endpoints) MigrationLog(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
MigrationLog migration log接口
func (*Endpoints) OrgcenterJobLogs ¶
func (e *Endpoints) OrgcenterJobLogs(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
OrgcenterJobLogs 包装数据中心--->任务列表 日志
func (*Endpoints) PushOnDeletingRuntimes ¶
func (*Endpoints) PushOnDeletingRuntimesPolling ¶
TODO: we should refactor the polling
func (*Endpoints) PushOnDeployment ¶
func (*Endpoints) PushOnDeploymentPolling ¶
TODO: we should refactor the polling
func (*Endpoints) RedeployRuntime ¶
func (e *Endpoints) RedeployRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
RedeployRuntime 重新部署
func (*Endpoints) RedeployRuntimeAction ¶
func (e *Endpoints) RedeployRuntimeAction(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
RedeployRuntime 重新部署, 给 action 调用的 endpoint
func (*Endpoints) ReferCluster ¶
func (e *Endpoints) ReferCluster(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ReferCluster 查看 runtime & addon 是否有使用集群
func (*Endpoints) RemoveAddons ¶
RemoveAddons 同步市场 addons 信息
func (*Endpoints) RestartRuntime ¶
func (e *Endpoints) RestartRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
RestartRuntime 重启应用实例
func (*Endpoints) RollbackRuntime ¶
func (e *Endpoints) RollbackRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
Rollback 回滚应用实例
func (*Endpoints) RollbackRuntimeAction ¶
func (*Endpoints) Routes ¶
func (e *Endpoints) Routes() []httpserver.Endpoint
Routes 返回 endpoints 的所有 endpoint 方法,也就是 route.
func (*Endpoints) RuntimeLogs ¶
func (e *Endpoints) RuntimeLogs(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
runtimeLogs 包装runtime部署日志
func (*Endpoints) StartRuntime ¶
func (e *Endpoints) StartRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
StartRuntime 启动应用实例
func (*Endpoints) StopRuntime ¶
func (e *Endpoints) StopRuntime(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
StopRuntime 停止应用实例
func (*Endpoints) SyncAddonReferenceNum ¶
func (*Endpoints) SyncAddonResources ¶
func (*Endpoints) SyncAddons ¶
SyncAddons 同步市场 addons 信息
func (*Endpoints) SyncDeployAddon ¶
SyncDeployAddon 检测是否有未正常结束的addon,重新同步
func (*Endpoints) SyncProjects ¶
SyncProjects 同步project信息
type InstanceRequestType ¶
type InstanceRequestType string
InstanceRequestType 获取实例输入的请求参数
const ( INSTANCE_REQUEST_TYPE_PROJECT InstanceRequestType = "project" INSTANCE_REQUEST_TYPE_APPLICATION InstanceRequestType = "application" INSTANCE_REQUEST_TYPE_SERVICE InstanceRequestType = "service" INSTANCE_REQUEST_TYPE_RUNTIME InstanceRequestType = "runtime" )
type InstanceStatusEvent ¶
type Option ¶
type Option func(*Endpoints)
Option Endpoints 配置选项
func WithDeployment ¶
func WithDeployment(deployment *deployment.Deployment) Option
WithDeployment 设置 deployment 对象.
func WithEnvEncrypt ¶
func WithEnvEncrypt(encrypt *encryption.EnvEncrypt) Option
WithEnvEncrypt 设置 encrypt service
func WithEventManager ¶
func WithEventManager(evMgr *events.EventManager) Option
WithEventManager 配置 EventManager
func WithInstance ¶
WithInstance 设置 instance 对象
func WithMigration ¶
WithMigration 设置 migration service
func WithResource ¶
WithResource 设置 resource service
type RuntimeStatusEventReq ¶
type RuntimeStatusEventReq struct { RuntimeName string `json:"runtimeName"` IsDeleted bool `json:"isDeleted"` EventType string `json:"eventType"` // total(全量事件)/increment(增量事件) ServiceStatuses []ServiceStatusEvent `json:"serviceStatuses"` }
type ServiceStatusEvent ¶
type ServiceStatusEvent struct { ServiceName string `json:"serviceName"` Status string `json:"serviceStatus"` Replica int `json:"replica"` InstanceStatuses []InstanceStatusEvent `json:"instanceStatuses"` }