Documentation ¶
Overview ¶
* Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Variables
- type ProcServer
- func (ps *ProcServer) CalculateModuleAttributeDifference(ctx context.Context, header http.Header, module metadata.ModuleInst) ([]metadata.ModuleChangedAttribute, errors.CCErrorCoder)
- func (ps *ProcServer) CheckHostInBusiness(ctx *rest.Contexts, bizID int64, hostIDs []int64) errors.CCErrorCoder
- func (ps *ProcServer) CreateProcessInstances(ctx *rest.Contexts)
- func (ps *ProcServer) CreateProcessTemplateBatch(ctx *rest.Contexts)
- func (ps *ProcServer) CreateServiceCategory(ctx *rest.Contexts)
- func (ps *ProcServer) CreateServiceInstances(ctx *rest.Contexts)
- func (ps *ProcServer) CreateServiceInstancesPreview(ctx *rest.Contexts)
- func (ps *ProcServer) CreateServiceTemplate(ctx *rest.Contexts)
- func (ps *ProcServer) DeleteProcessInstance(ctx *rest.Contexts)
- func (ps *ProcServer) DeleteProcessTemplateBatch(ctx *rest.Contexts)
- func (ps *ProcServer) DeleteServiceCategory(ctx *rest.Contexts)
- func (ps *ProcServer) DeleteServiceInstance(ctx *rest.Contexts)
- func (ps *ProcServer) DeleteServiceInstancePreview(ctx *rest.Contexts)
- func (ps *ProcServer) DeleteServiceTemplate(ctx *rest.Contexts)
- func (ps *ProcServer) DiffServiceInstanceWithTemplate(ctx *rest.Contexts)
- func (ps *ProcServer) GetProcessTemplate(ctx *rest.Contexts)
- func (ps *ProcServer) GetServiceTemplate(ctx *rest.Contexts)
- func (ps *ProcServer) GetServiceTemplateDetail(ctx *rest.Contexts)
- func (ps *ProcServer) Healthz(req *restful.Request, resp *restful.Response)
- func (ps *ProcServer) ListProcessInstances(ctx *rest.Contexts)
- func (ps *ProcServer) ListProcessInstancesDetailsByIDs(ctx *rest.Contexts)
- func (ps *ProcServer) ListProcessInstancesNameIDsInModule(ctx *rest.Contexts)
- func (ps *ProcServer) ListProcessInstancesWithHost(ctx *rest.Contexts)
- func (ps *ProcServer) ListProcessTemplate(ctx *rest.Contexts)
- func (ps *ProcServer) ListServiceCategory(ctx *rest.Contexts)
- func (ps *ProcServer) ListServiceCategoryWithStatistics(ctx *rest.Contexts)
- func (ps *ProcServer) ListServiceInstancesDetails(ctx *rest.Contexts)
- func (ps *ProcServer) ListServiceInstancesWithHost(ctx *rest.Contexts)
- func (ps *ProcServer) ListServiceInstancesWithHostWeb(ctx *rest.Contexts)
- func (ps *ProcServer) ListServiceTemplates(ctx *rest.Contexts)
- func (ps *ProcServer) ListServiceTemplatesWithDetails(ctx *rest.Contexts)
- func (ps *ProcServer) OnProcessConfigUpdate(previous, current cfnc.ProcessConfig)
- func (ps *ProcServer) RemoveTemplateBindingOnModule(ctx *rest.Contexts)
- func (ps *ProcServer) SearchServiceInstancesInModule(ctx *rest.Contexts)
- func (ps *ProcServer) SearchServiceInstancesInModuleWeb(ctx *rest.Contexts)
- func (ps *ProcServer) ServiceInstanceAddLabels(ctx *rest.Contexts)
- func (ps *ProcServer) ServiceInstanceLabelsAggregation(ctx *rest.Contexts)
- func (ps *ProcServer) ServiceInstanceRemoveLabels(ctx *rest.Contexts)
- func (ps *ProcServer) SyncServiceInstanceByTemplate(ctx *rest.Contexts)
- func (ps *ProcServer) UpdateProcessInstances(ctx *rest.Contexts)
- func (ps *ProcServer) UpdateProcessInstancesByIDs(ctx *rest.Contexts)
- func (ps *ProcServer) UpdateProcessTemplate(ctx *rest.Contexts)
- func (ps *ProcServer) UpdateServiceCategory(ctx *rest.Contexts)
- func (ps *ProcServer) UpdateServiceTemplate(ctx *rest.Contexts)
- func (ps *ProcServer) WebService() *restful.Container
Constants ¶
This section is empty.
Variables ¶
var UnbindServiceTemplateOnModuleEnable = true
Functions ¶
This section is empty.
Types ¶
type ProcServer ¶
type ProcServer struct { *backbone.Engine EsbConfigChn chan esbutil.EsbConfig Config *options.Config EsbSrv esbserver.EsbClientInterface ConfigMap map[string]string AuthManager *extensions.AuthManager Logic *logics.Logic EnableTxn bool // contains filtered or unexported fields }
func (*ProcServer) CalculateModuleAttributeDifference ¶
func (ps *ProcServer) CalculateModuleAttributeDifference(ctx context.Context, header http.Header, module metadata.ModuleInst) ([]metadata.ModuleChangedAttribute, errors.CCErrorCoder)
func (*ProcServer) CheckHostInBusiness ¶
func (ps *ProcServer) CheckHostInBusiness(ctx *rest.Contexts, bizID int64, hostIDs []int64) errors.CCErrorCoder
func (*ProcServer) CreateProcessInstances ¶
func (ps *ProcServer) CreateProcessInstances(ctx *rest.Contexts)
func (*ProcServer) CreateProcessTemplateBatch ¶
func (ps *ProcServer) CreateProcessTemplateBatch(ctx *rest.Contexts)
create a process template for a service template.
func (*ProcServer) CreateServiceCategory ¶
func (ps *ProcServer) CreateServiceCategory(ctx *rest.Contexts)
func (*ProcServer) CreateServiceInstances ¶
func (ps *ProcServer) CreateServiceInstances(ctx *rest.Contexts)
createServiceInstances 创建服务实例 支持直接创建和通过模板创建,用 module 是否绑定模版信息区分两种情况 通过模板创建时,进程信息则表现为更新
func (*ProcServer) CreateServiceInstancesPreview ¶
func (ps *ProcServer) CreateServiceInstancesPreview(ctx *rest.Contexts)
CreateServiceInstancesPreview generate a preview for service instance creation related host transfer action
func (*ProcServer) CreateServiceTemplate ¶
func (ps *ProcServer) CreateServiceTemplate(ctx *rest.Contexts)
func (*ProcServer) DeleteProcessInstance ¶
func (ps *ProcServer) DeleteProcessInstance(ctx *rest.Contexts)
func (*ProcServer) DeleteProcessTemplateBatch ¶
func (ps *ProcServer) DeleteProcessTemplateBatch(ctx *rest.Contexts)
func (*ProcServer) DeleteServiceCategory ¶
func (ps *ProcServer) DeleteServiceCategory(ctx *rest.Contexts)
func (*ProcServer) DeleteServiceInstance ¶
func (ps *ProcServer) DeleteServiceInstance(ctx *rest.Contexts)
func (*ProcServer) DeleteServiceInstancePreview ¶
func (ps *ProcServer) DeleteServiceInstancePreview(ctx *rest.Contexts)
func (*ProcServer) DeleteServiceTemplate ¶
func (ps *ProcServer) DeleteServiceTemplate(ctx *rest.Contexts)
a service template can be delete only when it is not be used any more, which means that no process instance belongs to it.
func (*ProcServer) DiffServiceInstanceWithTemplate ¶
func (ps *ProcServer) DiffServiceInstanceWithTemplate(ctx *rest.Contexts)
this function works to find differences between the service template and service instances in a module. compared to the service template's process template, a process instance in the service instance may contains several differences, like as follows: unchanged: the process instance's property values are same with the process template it belongs. changed: the process instance's property values are not same with the process template it belongs. add: a new process template is added, compared to the service instance belongs to this service template. deleted: a process is already deleted, compared to the service instance belongs to this service template.
func (*ProcServer) GetProcessTemplate ¶
func (ps *ProcServer) GetProcessTemplate(ctx *rest.Contexts)
func (*ProcServer) GetServiceTemplate ¶
func (ps *ProcServer) GetServiceTemplate(ctx *rest.Contexts)
func (*ProcServer) GetServiceTemplateDetail ¶
func (ps *ProcServer) GetServiceTemplateDetail(ctx *rest.Contexts)
GetServiceTemplateDetail return more info than GetServiceTemplate
func (*ProcServer) Healthz ¶
func (ps *ProcServer) Healthz(req *restful.Request, resp *restful.Response)
func (*ProcServer) ListProcessInstances ¶
func (ps *ProcServer) ListProcessInstances(ctx *rest.Contexts)
func (*ProcServer) ListProcessInstancesDetailsByIDs ¶
func (ps *ProcServer) ListProcessInstancesDetailsByIDs(ctx *rest.Contexts)
ListProcessInstancesDetailsByIDs get process instances details by their ids
func (*ProcServer) ListProcessInstancesNameIDsInModule ¶
func (ps *ProcServer) ListProcessInstancesNameIDsInModule(ctx *rest.Contexts)
ListProcessInstancesNameIDsInModule get the process id list with its name in a module
func (*ProcServer) ListProcessInstancesWithHost ¶
func (ps *ProcServer) ListProcessInstancesWithHost(ctx *rest.Contexts)
func (*ProcServer) ListProcessTemplate ¶
func (ps *ProcServer) ListProcessTemplate(ctx *rest.Contexts)
func (*ProcServer) ListServiceCategory ¶
func (ps *ProcServer) ListServiceCategory(ctx *rest.Contexts)
func (*ProcServer) ListServiceCategoryWithStatistics ¶
func (ps *ProcServer) ListServiceCategoryWithStatistics(ctx *rest.Contexts)
func (*ProcServer) ListServiceInstancesDetails ¶
func (ps *ProcServer) ListServiceInstancesDetails(ctx *rest.Contexts)
func (*ProcServer) ListServiceInstancesWithHost ¶
func (ps *ProcServer) ListServiceInstancesWithHost(ctx *rest.Contexts)
func (*ProcServer) ListServiceInstancesWithHostWeb ¶
func (ps *ProcServer) ListServiceInstancesWithHostWeb(ctx *rest.Contexts)
ListServiceInstancesWithHostWeb will return topo level info for each service instance api only for web frontend
func (*ProcServer) ListServiceTemplates ¶
func (ps *ProcServer) ListServiceTemplates(ctx *rest.Contexts)
func (*ProcServer) ListServiceTemplatesWithDetails ¶
func (ps *ProcServer) ListServiceTemplatesWithDetails(ctx *rest.Contexts)
func (*ProcServer) OnProcessConfigUpdate ¶
func (ps *ProcServer) OnProcessConfigUpdate(previous, current cfnc.ProcessConfig)
func (*ProcServer) RemoveTemplateBindingOnModule ¶
func (ps *ProcServer) RemoveTemplateBindingOnModule(ctx *rest.Contexts)
func (*ProcServer) SearchServiceInstancesInModule ¶
func (ps *ProcServer) SearchServiceInstancesInModule(ctx *rest.Contexts)
func (*ProcServer) SearchServiceInstancesInModuleWeb ¶
func (ps *ProcServer) SearchServiceInstancesInModuleWeb(ctx *rest.Contexts)
func (*ProcServer) ServiceInstanceAddLabels ¶
func (ps *ProcServer) ServiceInstanceAddLabels(ctx *rest.Contexts)
func (*ProcServer) ServiceInstanceLabelsAggregation ¶
func (ps *ProcServer) ServiceInstanceLabelsAggregation(ctx *rest.Contexts)
ServiceInstanceLabelsAggregation aggregation instance's labels
func (*ProcServer) ServiceInstanceRemoveLabels ¶
func (ps *ProcServer) ServiceInstanceRemoveLabels(ctx *rest.Contexts)
func (*ProcServer) SyncServiceInstanceByTemplate ¶
func (ps *ProcServer) SyncServiceInstanceByTemplate(ctx *rest.Contexts)
SyncServiceInstanceByTemplate sync the service instance with it's bounded service template. It keeps the processes exactly same with the process template in the service template, which means the number of process is same, and the process instance's info is also exactly same. It contains several scenarios in a service instance: 1. add a new process 2. update a process 3. removed a process
func (*ProcServer) UpdateProcessInstances ¶
func (ps *ProcServer) UpdateProcessInstances(ctx *rest.Contexts)
func (*ProcServer) UpdateProcessInstancesByIDs ¶
func (ps *ProcServer) UpdateProcessInstancesByIDs(ctx *rest.Contexts)
func (*ProcServer) UpdateProcessTemplate ¶
func (ps *ProcServer) UpdateProcessTemplate(ctx *rest.Contexts)
func (*ProcServer) UpdateServiceCategory ¶
func (ps *ProcServer) UpdateServiceCategory(ctx *rest.Contexts)
func (*ProcServer) UpdateServiceTemplate ¶
func (ps *ProcServer) UpdateServiceTemplate(ctx *rest.Contexts)
func (*ProcServer) WebService ¶
func (ps *ProcServer) WebService() *restful.Container