microservice

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkloadKindDeployment  = "Deployment"
	WorkloadKindStatefulSet = "StatefulSet"
	WorkloadKindDaemonSet   = "DaemonSet"
)
View Source
const GemsAnnotationVirtualspace = networking.AnnotationVirtualSpace

Variables

View Source
var (
	SearchFields   = []string{"VirtualSpaceName"}
	FilterFields   = []string{"VirtualSpaceName", "ID"}
	PreloadFields  = []string{"Environments", "Users"}
	OrderFields    = []string{"VirtualSpaceName", "ID"}
	ModelName      = "VirtualSpace"
	PrimaryKeyName = "virtualspace_id"
)

Functions

This section is empty.

Types

type HTTPRoute

type HTTPRoute struct {
	Match   []*networkingv1alpha3.HTTPMatchRequest     `protobuf:"bytes,1,rep,name=match,proto3" json:"match,omitempty"`
	Route   []*networkingv1alpha3.HTTPRouteDestination `protobuf:"bytes,2,rep,name=route,proto3" json:"route,omitempty"`
	Timeout *ptypes.Duration                           `protobuf:"bytes,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
	Retries *networkingv1alpha3.HTTPRetry              `protobuf:"bytes,7,opt,name=retries,proto3" json:"retries,omitempty"`
	Fault   *networkingv1alpha3.HTTPFaultInjection     `protobuf:"bytes,8,opt,name=fault,proto3" json:"fault,omitempty"`
}

给前端看,实际不用

type IstioGatewayHandler

type IstioGatewayHandler struct {
	MicroserviceOptions *microservice.MicroserviceOptions
	base.BaseHandler
}

func (*IstioGatewayHandler) CreateGateway

func (h *IstioGatewayHandler) CreateGateway(c *gin.Context)

@Tags Istio @Summary 创建istio网关实例` @Description 创建istio网关实例 @Accept json @Produce json @Param virtualspace_id path string true "virtualspace_id" @Param cluster_id path string true "cluster_id" @Param param body IstioGatewayInstance true "网关内容" @Success 200 {object} handlers.ResponseStruct{Data=IstioGatewayInstance} "网关内容" @Router /v1/virtualspace/{virtualspace_id}/cluster/{cluster_id}/istiogateways [post] @Security JWT nolint: funlen

func (*IstioGatewayHandler) DeleteGateway

func (h *IstioGatewayHandler) DeleteGateway(c *gin.Context)

@Tags Istio @Summary 删除istio网关实例 @Description 删除istio网关实例 @Accept json @Produce json @Param virtualspace_id path string true "virtualspace_id" @Param cluster_id path string true "cluster_id" @Success 200 {object} handlers.ResponseStruct{Data=string} "resp" @Router /v1/virtualspace/{virtualspace_id}/cluster/{cluster_id}/istiogateways/{name} [delete] @Security JWT

func (*IstioGatewayHandler) GetGateway

func (h *IstioGatewayHandler) GetGateway(c *gin.Context)

@Tags Istio @Summary istio网关实例列表 @Description istio网关实例列表 @Accept json @Produce json @Param virtualspace_id path string true "virtualspace_id" @Param cluster_id path string true "cluster_id" @Param name path string true "网关名" @Success 200 {object} handlers.ResponseStruct{Data=IstioGatewayInstance} "IstioOperator" @Router /v1/virtualspace/{virtualspace_id}/cluster/{cluster_id}/istiogateways/{name} [get] @Security JWT nolint: funlen,gocognit

func (*IstioGatewayHandler) ListGateway

func (h *IstioGatewayHandler) ListGateway(c *gin.Context)

@Tags Istio @Summary istio网关实例列表 @Description istio网关实例列表 @Accept json @Produce json @Param virtualspace_id path string true "virtualspace_id" @Param cluster_id path string true "cluster_id" @Success 200 {object} handlers.ResponseStruct{Data=[]IstioGatewayInstance} "IstioOperator" @Router /v1/virtualspace/{virtualspace_id}/cluster/{cluster_id}/istiogateways [get] @Security JWT nolint: funlen

func (*IstioGatewayHandler) RegistRouter

func (h *IstioGatewayHandler) RegistRouter(rg *gin.RouterGroup)

func (*IstioGatewayHandler) UpdateGateway

func (h *IstioGatewayHandler) UpdateGateway(c *gin.Context)

@Tags Istio @Summary 更新istio网关实例 @Description 更新istio网关实例 @Accept json @Produce json @Param cluster_id path string true "cluster_id" @Param virtualspace_id path string true "virtualspace_id" @Param param body IstioGatewayInstance true "网关内容" @Success 200 {object} handlers.ResponseStruct{Data=IstioGatewayInstance} "网关内容" @Router /v1/virtualspace/{virtualspace_id}/cluster/{cluster_id}/istiogateways [put] @Security JWT

type IstioGatewayInstance

type IstioGatewayInstance struct {
	// TODO add more fields
	Name            string `binding:"required"`
	Enabled         bool
	Gateways        []v1beta1.Gateway        `json:",omitempty"`
	VirtualServices []v1beta1.VirtualService `json:",omitempty"`
	Pods            []corev1.Pod             `json:",omitempty"`

	appsv1.DeploymentStatus `json:"status"`
	Ports                   []corev1.ServicePort `json:"ports"`
}

type IstioResources

type IstioResources struct {
	Gateways        []istioclinetworkingv1alpha3.Gateway        `json:"gateways"`
	VirtualServices []istioclinetworkingv1alpha3.VirtualService `json:"virtualServices"`
	Sidecars        []istioclinetworkingv1alpha3.Sidecar        `json:"sidecars"`
	ServiceEntries  []istioclinetworkingv1alpha3.ServiceEntry   `json:"serviceEntries"`
}

type KialiAPIRequest

type KialiAPIRequest struct {
	Path           string
	VirtualspaceId string
}

type MicroServiceHandler

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

func (*MicroServiceHandler) RegistRouter

func (h *MicroServiceHandler) RegistRouter(rg *gin.RouterGroup)

type ServiceDetail

type ServiceDetail struct {
	Service          v1.Service                              `json:"service"`
	DestinationRules []networkingpkgv1alpha3.DestinationRule `json:"destinationRules"`
	VirtualServices  []networkingpkgv1alpha3.VirtualService  `json:"virtualServices"`
	Workloads        kialimodels.WorkloadOverviews           `json:"workloads"`
}

func (ServiceDetail) GetCreationTimestamp

func (s ServiceDetail) GetCreationTimestamp() metav1.Time

func (ServiceDetail) GetName

func (s ServiceDetail) GetName() string

type TCPRoute

type TCPRoute struct {
	// Match conditions to be satisfied for the rule to be
	// activated. All conditions inside a single match block have AND
	// semantics, while the list of match blocks have OR semantics. The rule
	// is matched if any one of the match blocks succeed.
	Match []*networkingv1alpha3.L4MatchAttributes `protobuf:"bytes,1,rep,name=match,proto3" json:"match,omitempty"`
	// The destination to which the connection should be forwarded to.
	Route []*networkingv1alpha3.RouteDestination `protobuf:"bytes,2,rep,name=route,proto3" json:"route,omitempty"`
}

type VirtualDomainHandler

type VirtualDomainHandler struct {
	base.BaseHandler
	MicroserviceOptions *microservice.MicroserviceOptions
}

func (*VirtualDomainHandler) DeleteVirtualDomain

func (h *VirtualDomainHandler) DeleteVirtualDomain(c *gin.Context)

DeleteVirtualDomain 删除 VirtualDomain @Tags VirtualDomain @Summary 删除 VirtualDomain @Description 删除 VirtualDomain @Accept json @Produce json @Param virtualdomain_id path uint true "virtualdomain_id" @Success 200 {object} handlers.ResponseStruct "resp" @Router /v1/virtualdomain/{virtualdomain_id} [delete] @Security JWT

func (*VirtualDomainHandler) GetVirtualDomain

func (h *VirtualDomainHandler) GetVirtualDomain(c *gin.Context)

GetVirtualDomain VirtualDomain详情 @Tags VirtualDomain @Summary VirtualDomain详情 @Description get VirtualDomain详情 @Accept json @Produce json @Param virtualdomain_id path uint true "virtualdomain_id" @Success 200 {object} handlers.ResponseStruct{Data=models.VirtualDomain} "VirtualDomain" @Router /v1/virtualdomain/{virtualdomain_id} [get] @Security JWT

func (*VirtualDomainHandler) InjectVirtualDomain

func (h *VirtualDomainHandler) InjectVirtualDomain(c *gin.Context)

InjectVirtualDomain 为 service 设置 serviceentry TODO:

func (*VirtualDomainHandler) ListVirtualDomain

func (h *VirtualDomainHandler) ListVirtualDomain(c *gin.Context)

ListVirtualDomain 列表 VirtualDomain @Tags VirtualDomain @Summary VirtualDomain列表 @Description VirtualDomain列表 @Accept json @Produce json @Param VirtualDomainName query string false "VirtualDomainName" @Param VirtualDomainID query string false "VirtualDomainID" @Param page query int false "page" @Param size query int false "page" @Param search query string false "search in (VirtualDomainName)" @Success 200 {object} handlers.ResponseStruct{Data=handlers.PageData{List=[]models.VirtualDomain}} "VirtualDomain" @Router /v1/virtualdomain [get] @Security JWT

func (*VirtualDomainHandler) PostVirtualDomain

func (h *VirtualDomainHandler) PostVirtualDomain(c *gin.Context)

PostVirtualDomain 创建VirtualDomain @Tags VirtualDomain @Summary 创建VirtualDomain @Description 创建VirtualDomain @Accept json @Produce json @Param param body models.VirtualDomain true "表单" @Success 200 {object} handlers.ResponseStruct{Data=models.VirtualDomain} "VirtualDomain" @Router /v1/virtualdomain [post] @Security JWT

func (*VirtualDomainHandler) PutVirtualDomain

func (h *VirtualDomainHandler) PutVirtualDomain(c *gin.Context)

PutVirtualDomain 更新VirtualDomain @Tags VirtualDomain @Summary 更新VirtualDomain @Description 更新VirtualDomain @Accept json @Produce json @Param virtualdomain_id path uint true "virtualdomain_id" @Param param body models.VirtualDomain true "表单" @Success 200 {object} handlers.ResponseStruct{Data=models.VirtualDomain} "VirtualDomain" @Router /v1/virtualdomain/{virtualdomain_id} [put] @Security JWT

func (*VirtualDomainHandler) RegistRouter

func (h *VirtualDomainHandler) RegistRouter(rg *gin.RouterGroup)

func (*VirtualDomainHandler) UnInjectVirtualDomain

func (h *VirtualDomainHandler) UnInjectVirtualDomain(c *gin.Context)

UnInjectVirtualDomain 为 service 取消设置 serviceentry TODO:

type VirtualSpaceHandler

type VirtualSpaceHandler struct {
	base.BaseHandler
	MicroserviceOptions *microserviceoptions.MicroserviceOptions
}

func (*VirtualSpaceHandler) AddEnvironment

func (h *VirtualSpaceHandler) AddEnvironment(c *gin.Context)

AddEnvironment 向虚拟空间增加环境 @Tags VirtualSpace @Summary 向虚拟空间增加环境 @Description 向虚拟空间增加环境 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param param body models.Environment true "环境" @Success 200 {object} handlers.ResponseStruct "resp" @Router /v1/virtualspace/{virtualspace_id}/environment [post] @Security JWT

func (*VirtualSpaceHandler) DeleteVirtualSpace

func (h *VirtualSpaceHandler) DeleteVirtualSpace(c *gin.Context)

DeleteVirtualSpace 删除 VirtualSpace @Tags VirtualSpace @Summary 删除 VirtualSpace @Description 删除 VirtualSpace @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Success 200 {object} handlers.ResponseStruct "resp" @Router /v1/virtualspace/{virtualspace_id} [delete] @Security JWT

func (*VirtualSpaceHandler) DeleteVirtualSpaceUser

func (h *VirtualSpaceHandler) DeleteVirtualSpaceUser(c *gin.Context)

DeleteVirtualSpaceUser 删除 User 和 VirtualSpace 的关系 @Tags VirtualSpace @Summary 删除 User 和 VirtualSpace 的关系 @Description 删除 User 和 VirtualSpace 的关系 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param user_id path uint true "user_id" @Success 200 {object} handlers.ResponseStruct "models.User" @Router /v1/virtualspace/{virtualspace_id}/user/{user_id} [delete] @Security JWT

func (*VirtualSpaceHandler) EnableOrDisableVirtualSpace

func (h *VirtualSpaceHandler) EnableOrDisableVirtualSpace(c *gin.Context)

EnableOrDisableVirtualSpace 激活/禁用VirtualSpace @Tags VirtualSpace @Summary 激活/禁用VirtualSpace @Description 激活/禁用VirtualSpace @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param enable query bool true "激活/禁用镜像仓库" @Success 200 {object} handlers.ResponseStruct{Data=models.VirtualSpace} "VirtualSpace" @Router /v1/virtualspace/{virtualspace_id} [patch] @Security JWT

func (*VirtualSpaceHandler) GetService

func (h *VirtualSpaceHandler) GetService(c *gin.Context)

GetService service详情 @Tags VirtualSpace @Summary service详情 @Description service详情 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param service_name path string true "service_name" @Success 200 {object} handlers.ResponseStruct{Data=string} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/service/{service_name} [get] @Security JWT

func (*VirtualSpaceHandler) GetVirtualSpace

func (h *VirtualSpaceHandler) GetVirtualSpace(c *gin.Context)

GetVirtualSpace VirtualSpace详情 @Tags VirtualSpace @Summary VirtualSpace详情 @Description get VirtualSpace详情 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Success 200 {object} handlers.ResponseStruct{Data=models.VirtualSpace} "VirtualSpace" @Router /v1/virtualspace/{virtualspace_id} [get] @Security JWT

func (*VirtualSpaceHandler) GetWorkload

func (h *VirtualSpaceHandler) GetWorkload(c *gin.Context)

GetWorkload workload详情 @Tags VirtualSpace @Summary workload详情 @Description workload详情(带相关service) @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param kind query string true "workload类型, Deployment, StatefulSet, DaemonSet" @Success 200 {object} handlers.ResponseStruct{WorkloadDetails} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/{environment_id}/workload/{name} [get] @Security JWT

func (*VirtualSpaceHandler) InjectIstioSidecar

func (h *VirtualSpaceHandler) InjectIstioSidecar(c *gin.Context)

InjectIstioSidecar 注入sidecar @Tags VirtualSpace @Summary 注入istio控制 @Description 注入istio控制 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param kind query string true "workload类型, Deployment, StatefulSet, DaemonSet" @Param inject query bool true "注入(true) or 取消注入(false)" @Success 200 {object} handlers.ResponseStruct "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/workload/{name}/istiosidecar [put] @Security JWT

func (*VirtualSpaceHandler) InjectVirtualDomain

func (h *VirtualSpaceHandler) InjectVirtualDomain(c *gin.Context)

InjectIstioSidecar 注入虚拟域名 @Tags VirtualSpace @Summary 设置虚拟域名 @Description 设置虚拟域名 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param kind query string true "workload类型, Deployment, StatefulSet, DaemonSet" @Param virtualdomain query string true "需要被设置的虚拟域名,取消时设置为空" @Success 200 {object} handlers.ResponseStruct "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/workload/{name}/sidecar [put] @Security JWT

func (*VirtualSpaceHandler) KialiAPI

func (h *VirtualSpaceHandler) KialiAPI(c *gin.Context)

@Tags VirtualSpace @Summary kiali代理 @Description kiali api 代理 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id(通过环境寻找目标集群)" @Param path path string true "访问 kiali service 的路径" @Success 200 {object} object "kiali 原始响应" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/kiali/{kiaklipath} [get] @Security JWT

func (*VirtualSpaceHandler) ListEnvironment

func (h *VirtualSpaceHandler) ListEnvironment(c *gin.Context)

ListEnvironment 获取虚拟空间下的环境 @Tags VirtualSpace @Summary 获取虚拟空间下的环境 @Description 获取虚拟空间下的环境 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param preload query string false "choices Project,Cluster" @Success 200 {object} handlers.ResponseStruct{Data=handlers.PageData{List=[]models.Environment}} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment [get] @Security JWT

func (*VirtualSpaceHandler) ListIstioResources

func (h *VirtualSpaceHandler) ListIstioResources(c *gin.Context)

ListIstioResources 列举 istio 资源 @Tags VirtualSpace @Summary 列举 istio 资源 @Description 列举 istio 所以类型资源 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Success 200 {object} handlers.ResponseStruct{Data=IstioResources} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/istioresources [get] @Security JWT

func (*VirtualSpaceHandler) ListServices

func (h *VirtualSpaceHandler) ListServices(c *gin.Context)

ListServices service列表 @Tags VirtualSpace @Summary service列表 @Description service列表 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param search query string true "service名称" @Success 200 {object} handlers.ResponseStruct{Data=pagination.PageData{List=[]string}} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/service [get] @Security JWT

func (*VirtualSpaceHandler) ListVirtualSpace

func (h *VirtualSpaceHandler) ListVirtualSpace(c *gin.Context)

ListVirtualSpace 列表 VirtualSpace @Tags VirtualSpace @Summary VirtualSpace列表 @Description VirtualSpace列表 @Accept json @Produce json @Param VirtualSpaceName query string false "VirtualSpaceName" @Param VirtualSpaceID query string false "VirtualSpaceID" @Param preload query string false "choices Environments,Users" @Param page query int false "page" @Param size query int false "page" @Param search query string false "search in (VirtualSpaceName)" @Success 200 {object} handlers.ResponseStruct{Data=handlers.PageData{List=[]models.VirtualSpace}} "VirtualSpace" @Router /v1/virtualspace [get] @Security JWT

func (*VirtualSpaceHandler) ListVirtualSpaceUser

func (h *VirtualSpaceHandler) ListVirtualSpaceUser(c *gin.Context)

ListVirtualSpaceUser 获取属于VirtualSpace的 User 列表 @Tags VirtualSpace @Summary 获取属于 VirtualSpace 的 User 列表 @Description 获取属于 VirtualSpace 的 User 列表 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param page query int false "page" @Param size query int false "page" @Param search query string false "search in (Username,Email)" @Success 200 {object} handlers.ResponseStruct{Data=handlers.PageData{List=[]models.User}} "models.User" @Router /v1/virtualspace/{virtualspace_id}/user [get] @Security JWT

func (*VirtualSpaceHandler) ListWorkload

func (h *VirtualSpaceHandler) ListWorkload(c *gin.Context)

ListWorkload workload列表 @Tags VirtualSpace @Summary workload列表 @Description workload列表 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param kind query string true "workload类型, Deployment, StatefulSet, DaemonSet" @Param search query string true "workload名称" @Success 200 {object} handlers.ResponseStruct{Data=pagination.PageData{List=WorkloadDetails}} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/workload [get] @Security JWT

func (*VirtualSpaceHandler) PostVirtualSpace

func (h *VirtualSpaceHandler) PostVirtualSpace(c *gin.Context)

PostVirtualSpace 创建VirtualSpace @Tags VirtualSpace @Summary 创建VirtualSpace @Description 创建VirtualSpace @Accept json @Produce json @Param param body models.VirtualSpace true "表单" @Success 200 {object} handlers.ResponseStruct{Data=models.VirtualSpace} "VirtualSpace" @Router /v1/virtualspace [post] @Security JWT

func (*VirtualSpaceHandler) PostVirtualSpaceUser

func (h *VirtualSpaceHandler) PostVirtualSpaceUser(c *gin.Context)

PostVirtualSpaceUser 在User和VirtualSpace间添加关联关系 @Tags VirtualSpace @Summary 在User和VirtualSpace间添加关联关系 @Description 在User和VirtualSpace间添加关联关系 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param param body models.VirtualSpaceUserRels true "表单"` @Success 200 {object} handlers.ResponseStruct{Data=models.VirtualSpaceUserRels} "models.User" @Router /v1/virtualspace/{virtualspace_id}/user [post] @Security JWT

func (*VirtualSpaceHandler) PutVirtualSpace

func (h *VirtualSpaceHandler) PutVirtualSpace(c *gin.Context)

PutVirtualSpace 更新VirtualSpace @Tags VirtualSpace @Summary 更新VirtualSpace @Description 更新VirtualSpace @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param param body models.VirtualSpace true "表单" @Success 200 {object} handlers.ResponseStruct{Data=models.VirtualSpace} "VirtualSpace" @Router /v1/virtualspace/{virtualspace_id} [put] @Security JWT

func (*VirtualSpaceHandler) RegistRouter

func (h *VirtualSpaceHandler) RegistRouter(rg *gin.RouterGroup)

func (*VirtualSpaceHandler) RemoveEnvironment

func (h *VirtualSpaceHandler) RemoveEnvironment(c *gin.Context)

AddEnvironment 从虚拟空间删除环境 @Tags VirtualSpace @Summary 从虚拟空间删除环境 @Description 从虚拟空间删除环境 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Success 200 {object} handlers.ResponseStruct "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id [delete] @Security JWT

func (*VirtualSpaceHandler) ServiceFaultInjection

func (h *VirtualSpaceHandler) ServiceFaultInjection(c *gin.Context)

ServiceFaultInjection service故障注入 @Tags VirtualSpace @Summary service故障注入 @Description service故障注入 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param service_name path string true "service_name" @Param param body HTTPRoute true "故障注入" @Success 200 {object} handlers.ResponseStruct{Data=ServiceDetail} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/service/{service_name}/fault_injection [post] @Security JWT

func (*VirtualSpaceHandler) ServiceRequestRouting

func (h *VirtualSpaceHandler) ServiceRequestRouting(c *gin.Context)

ServiceRequestRouting service请求路由 @Tags VirtualSpace @Summary service请求路由 @Description service请求路由 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param service_name path string true "service_name" @Param param body []HTTPRoute true "请求路由" @Success 200 {object} handlers.ResponseStruct{Data=ServiceDetail} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/service/{service_name}/request_routing [post] @Security JWT

func (*VirtualSpaceHandler) ServiceRequestTimeout

func (h *VirtualSpaceHandler) ServiceRequestTimeout(c *gin.Context)

ServiceRequestTimeout service超时配置 @Tags VirtualSpace @Summary service超时配置 @Description service超时配置 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param service_name path string true "service_name" @Param param body HTTPRoute true "超时设置" @Success 200 {object} handlers.ResponseStruct{Data=ServiceDetail} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/service/{service_name}/request_timeouts [post] @Security JWT

func (*VirtualSpaceHandler) ServiceTCPTrafficShifting

func (h *VirtualSpaceHandler) ServiceTCPTrafficShifting(c *gin.Context)

ServiceTCPTrafficShifting service tcp流量切换 @Tags VirtualSpace @Summary service tcp流量切换 @Description service tcp流量切换 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param service_name path string true "service_name" @Param param body TCPRoute true "tcp流量切换" @Success 200 {object} handlers.ResponseStruct{Data=ServiceDetail} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/service/{service_name}/tcp_traffic_shifting [post] @Security JWT

func (*VirtualSpaceHandler) ServiceTrafficShifting

func (h *VirtualSpaceHandler) ServiceTrafficShifting(c *gin.Context)

ServiceTrafficShifting service流量切换 @Tags VirtualSpace @Summary service流量切换 @Description service流量切换 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param service_name path string true "service_name" @Param param body HTTPRoute true "流量切换" @Success 200 {object} handlers.ResponseStruct{Data=ServiceDetail} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/service/{service_name}/traffic_shifting [post] @Security JWT

func (*VirtualSpaceHandler) ServicetReset

func (h *VirtualSpaceHandler) ServicetReset(c *gin.Context)

ServicetReset service重置 @Tags VirtualSpace @Summary service重置 @Description service重置 @Accept json @Produce json @Param virtualspace_id path uint true "virtualspace_id" @Param environment_id path uint true "environment_id" @Param service_name path string true "service_name" @Success 200 {object} handlers.ResponseStruct{Data=ServiceDetail} "resp" @Router /v1/virtualspace/{virtualspace_id}/environment/environment_id/service/{service_name}/reset [post] @Security JWT

type WorkloadDetails

type WorkloadDetails struct {
	Name          string           `json:"name,omitempty"`
	Kind          string           `json:"kind,omitempty"`
	Cluster       string           `json:"cluster,omitempty"`
	Namespace     string           `json:"namespace,omitempty"`
	Tenant        string           `json:"tenant,omitempty"`
	VirtualSpace  string           `json:"virtualSpace,omitempty"`
	Environment   string           `json:"environment,omitempty"`
	IstioInjected bool             `json:"istioInjected,omitempty"`
	VirtualDomain []string         `json:"virtualDomain,omitempty"`
	Images        []string         `json:"images,omitempty"`
	IstioVersion  string           `json:"istioVersion,omitempty"`
	Services      []corev1.Service `json:"services,omitempty"` // 关联的service
	client.Object                  // 原始数据
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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