handler

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: LGPL-3.0 Imports: 95 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeCapacityStorageMetric = "node_filesystem_size_bytes"
	NodFreeStorageMetric      = "node_filesystem_free_bytes"
)
View Source
const (
	VolumeStatusUnknown          = "未知"
	VolumeStatusPending          = "待分配"
	VolumeStatusBoundButNotInUse = "未使用(重启虚拟机以使用该卷)"
	VolumeStatusBoundAndInUse    = "使用中(需进入虚拟机手动挂载)"
	VolumeStatusLost             = "已丢失"
)

Variables

View Source
var (
	ErrTenantEnvLackOfMemory = errors.New("tenant_env_lack_of_memory")
	ErrClusterLackOfMemory   = errors.New("cluster_lack_of_memory")
)
View Source
var (
	// ErrTenantEnvStillHasServices -
	ErrTenantEnvStillHasServices = errors.New("tenant env still has services")
	// ErrTenantEnvStillHasPlugins -
	ErrTenantEnvStillHasPlugins = errors.New("tenant env still has plugins")
)
View Source
var ErrServiceNotClosed = errors.New("Service has not been closed")

ErrServiceNotClosed -

Functions

func BasePack

func BasePack(text []byte) (string, error)

BasePack base pack

func CheckTenantEnvResource added in v1.1.0

func CheckTenantEnvResource(ctx context.Context, tenantEnv *dbmodel.TenantEnvs, needMemory int) error

CheckTenantEnvResource check tenantEnv's resource is support action or not

func ClusterAllocMemory

func ClusterAllocMemory(ctx context.Context) (int64, error)

ClusterAllocMemory returns the allocatable memory of the cluster.

func CreateLicenseManger

func CreateLicenseManger() error

CreateLicenseManger create service manager

func CreateLicensesInfoManager

func CreateLicensesInfoManager() error

CreateLicensesInfoManager CreateLicensesInfoManager

func CreateRootFuncHandler

func CreateRootFuncHandler(conf option.Config) error

CreateRootFuncHandler create root func handler

func GetAPPBackupHandler

func GetAPPBackupHandler() *group.BackupHandle

GetAPPBackupHandler GetAPPBackupHandler

func GetBuilderProxy

func GetBuilderProxy() proxy.Proxy

GetBuilderProxy GetNodeProxy

func GetDbgateProxy added in v1.1.0

func GetDbgateProxy(serviceID string) proxy.Proxy

GetDbgateProxy GetDbgateProxy

func GetFileBrowserProxy added in v1.1.0

func GetFileBrowserProxy(serviceID string) proxy.Proxy

GetFileBrowserProxy GetFileBrowserProxy

func GetMonitorProxy

func GetMonitorProxy() proxy.Proxy

GetMonitorProxy GetMonitorProxy

func GetNodeDiskAvailable added in v1.11.0

func GetNodeDiskAvailable(nodeName, nodeIP string, prometheusCli prometheus.Interface) float64

GetNodeDiskAvailable get node disk available

func GetNodeProxy

func GetNodeProxy() proxy.Proxy

GetNodeProxy GetNodeProxy

func GetObsLokiProxy added in v1.12.0

func GetObsLokiProxy() proxy.Proxy

func GetObsMimirProxy added in v1.11.0

func GetObsMimirProxy() proxy.Proxy

func GetObsProxy added in v1.1.0

func GetObsProxy() proxy.Proxy

GetObsProxy GetObsProxy

func GetObsTempoProxy added in v1.12.0

func GetObsTempoProxy() proxy.Proxy

func GetPluginShareHandle

func GetPluginShareHandle() *share.PluginShareHandle

GetPluginShareHandle get plugin share handle

func GetPrometheusProxy

func GetPrometheusProxy() proxy.Proxy

GetPrometheusProxy GetPrometheusProxy

func GetServicesDiskDeprecated

func GetServicesDiskDeprecated(ids []string, prometheusCli prometheus.Interface) map[string]float64

GetServicesDiskDeprecated get service disk

Deprecated

func GetShareHandle

func GetShareHandle() *share.ServiceShareHandle

GetShareHandle get share handle

func InitHandle

func InitHandle(conf option.Config,
	etcdClientArgs *etcdutil.ClientArgs,
	statusCli *client.AppRuntimeSyncClient,
	etcdcli *clientv3.Client,
	config *rest.Config,
	kubeClient kubernetes.Interface,
	wutongClient versioned.Interface,
	k8sClient k8sclient.Client,
	dynamicClient dynamic.Interface,
	apiextClient apiextclient.Interface,
	veleroClient veleroversioned.Interface,
) error

InitHandle 初始化handle

func InitProxy

func InitProxy(conf option.Config)

InitProxy 初始化

func ListLicense

func ListLicense() (map[string]*api_model.LicenseInfo, error)

ListLicense lise license

func TransStatus

func TransStatus(eStatus string) string

TransStatus trans service status

Types

type AllocMemory

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

AllocMemory represents a allocatable memory.

func NewAllocMemory

func NewAllocMemory(ctx context.Context, statusCli *client.AppRuntimeSyncClient, tenantEnv *dbmodel.TenantEnvs, batchOpReqs model.BatchOpRequesters) (*AllocMemory, error)

NewAllocMemory creates a new AllocMemory.

func (*AllocMemory) BadOpRequests

func (a *AllocMemory) BadOpRequests() model.BatchOpRequesters

BadOpRequests returns the badOpRequests.

func (*AllocMemory) BatchOpRequests

func (a *AllocMemory) BatchOpRequests() model.BatchOpRequesters

BatchOpRequests returns the batchOpRequests.

func (*AllocMemory) BatchOpResult

func (a *AllocMemory) BatchOpResult() model.BatchOpResult

BatchOpResult returns the batchOpResult.

type AppAction

type AppAction struct {
	MQClient mqclient.MQClient
	// contains filtered or unexported fields
}

AppAction app action

func CreateAppManager

func CreateAppManager(mqClient mqclient.MQClient) *AppAction

CreateAppManager create app manager

func GetAppHandler

func GetAppHandler() *AppAction

GetAppHandler GetAppHandler

func (*AppAction) Complete

func (a *AppAction) Complete(tr *model.ExportAppStruct) error

Complete Complete

func (*AppAction) ExportApp

func (a *AppAction) ExportApp(tr *model.ExportAppStruct) error

ExportApp ExportApp

func (*AppAction) GetStaticDir

func (a *AppAction) GetStaticDir() string

GetStaticDir get static dir

func (*AppAction) ImportApp

func (a *AppAction) ImportApp(importApp *model.ImportAppStruct) error

ImportApp import app

func (*AppAction) SetExportAppInfoParameter added in v1.1.0

func (a *AppAction) SetExportAppInfoParameter(appName, appVersion string, end bool)

SetExportAppInfoParameter pass the export app info parameter

type AppRestoreAction

type AppRestoreAction struct {
}

AppRestoreAction is an implementation of AppRestoreHandler

func (*AppRestoreAction) RestoreDepVols

func (a *AppRestoreAction) RestoreDepVols(tenantEnvID, serviceID string, req *apimodel.RestoreDepVolsReq) error

RestoreDepVols restores service dependent volumes.

func (*AppRestoreAction) RestoreDeps

func (a *AppRestoreAction) RestoreDeps(tenantEnvID, serviceID string, req *apimodel.RestoreDepsReq) error

RestoreDeps restores service dependencies.

func (*AppRestoreAction) RestoreEnvs

func (a *AppRestoreAction) RestoreEnvs(tenantEnvID, serviceID string, req *apimodel.RestoreEnvsReq) error

RestoreEnvs restores environment variables.

func (*AppRestoreAction) RestorePlugins

func (a *AppRestoreAction) RestorePlugins(tenantEnvID, serviceID string, req *apimodel.RestorePluginsReq) error

RestorePlugins restores service plugins.

func (*AppRestoreAction) RestorePorts

func (a *AppRestoreAction) RestorePorts(tenantEnvID, serviceID string, req *apimodel.RestorePortsReq) error

RestorePorts restores service ports.

func (*AppRestoreAction) RestoreProbe

func (a *AppRestoreAction) RestoreProbe(serviceID string, req *apimodel.ServiceProbe) error

RestoreProbe restores service probe.

func (*AppRestoreAction) RestoreVolumes

func (a *AppRestoreAction) RestoreVolumes(tenantEnvID, serviceID string, req *apimodel.RestoreVolumesReq) error

RestoreVolumes restores service volumes.

type AppRestoreHandler

type AppRestoreHandler interface {
	RestoreEnvs(tenantEnvID, serviceID string, req *apimodel.RestoreEnvsReq) error
	RestorePorts(tenantEnvID, serviceID string, req *apimodel.RestorePortsReq) error
	RestoreVolumes(tenantEnvID, serviceID string, req *apimodel.RestoreVolumesReq) error
	RestoreProbe(serviceID string, req *apimodel.ServiceProbe) error
	RestoreDeps(tenantEnvID, serviceID string, req *apimodel.RestoreDepsReq) error
	RestoreDepVols(tenantEnvID, serviceID string, req *apimodel.RestoreDepVolsReq) error
	RestorePlugins(tenantEnvID, serviceID string, req *apimodel.RestorePluginsReq) error
}

AppRestoreHandler defines handler methods to restore app. app means market service.

func GetAppRestoreHandler

func GetAppRestoreHandler() AppRestoreHandler

GetAppRestoreHandler returns a default AppRestoreHandler

func NewAppRestoreHandler

func NewAppRestoreHandler() AppRestoreHandler

NewAppRestoreHandler creates a new AppRestoreHandler.

type ApplicationAction

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

ApplicationAction -

func (*ApplicationAction) AddConfigGroup

AddConfigGroup -

func (*ApplicationAction) BatchBindService

func (a *ApplicationAction) BatchBindService(appID string, req model.BindServiceRequest) error

BatchBindService -

func (*ApplicationAction) BatchCreateApp

func (a *ApplicationAction) BatchCreateApp(ctx context.Context, apps *model.CreateAppRequest, tenantEnvID string) ([]model.CreateAppResponse, error)

BatchCreateApp -

func (*ApplicationAction) BatchUpdateComponentPorts

func (a *ApplicationAction) BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error

BatchUpdateComponentPorts -

func (*ApplicationAction) ChangeVolumes

func (a *ApplicationAction) ChangeVolumes(app *dbmodel.Application) error

ChangeVolumes Since the component name supports modification, the storage directory of stateful components will change. This interface is used to modify the original directory name to the storage directory that will actually be used.

func (*ApplicationAction) CheckGovernanceMode

func (a *ApplicationAction) CheckGovernanceMode(ctx context.Context, governanceMode string) error

CheckGovernanceMode Check whether the governance mode can be switched

func (*ApplicationAction) CreateApp

CreateApp -

func (*ApplicationAction) DeleteApp

func (a *ApplicationAction) DeleteApp(ctx context.Context, app *dbmodel.Application) error

DeleteApp -

func (*ApplicationAction) DeleteConfigGroup

func (a *ApplicationAction) DeleteConfigGroup(appID, configGroupName string) error

DeleteConfigGroup -

func (*ApplicationAction) GetAppByID

func (a *ApplicationAction) GetAppByID(appID string) (*dbmodel.Application, error)

GetAppByID -

func (*ApplicationAction) GetKubeResources added in v1.1.0

func (s *ApplicationAction) GetKubeResources(namespace string, servieAliases []string, customSetting model.KubeResourceCustomSetting) (string, error)

GetKubeResources get kube resources for application

func (*ApplicationAction) GetStatus

GetStatus -

func (*ApplicationAction) Install

func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, overrides []string) error

Install installs the application.

func (*ApplicationAction) ListAppStatuses

func (a *ApplicationAction) ListAppStatuses(ctx context.Context, appIDs []string) ([]*model.AppStatus, error)

ListAppStatuses -

func (*ApplicationAction) ListApps

func (a *ApplicationAction) ListApps(tenantEnvID, appName string, page, pageSize int) (*model.ListAppResponse, error)

ListApps -

func (*ApplicationAction) ListConfigGroups

func (a *ApplicationAction) ListConfigGroups(appID string, page, pageSize int) (*model.ListApplicationConfigGroupResp, error)

ListConfigGroups -

func (*ApplicationAction) ListHelmAppReleases

func (a *ApplicationAction) ListHelmAppReleases(ctx context.Context, app *dbmodel.Application) ([]*model.HelmAppRelease, error)

ListHelmAppReleases returns the list of the helm app.

func (*ApplicationAction) ListServices

func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error)

ListServices returns the list of the application.

func (*ApplicationAction) SyncAppConfigGroups

func (a *ApplicationAction) SyncAppConfigGroups(app *dbmodel.Application, appConfigGroups []model.AppConfigGroup) error

SyncAppConfigGroups -

func (*ApplicationAction) SyncComponentConfigGroupRels

func (a *ApplicationAction) SyncComponentConfigGroupRels(tx *gorm.DB, app *dbmodel.Application, components []*model.Component) error

SyncComponentConfigGroupRels -

func (*ApplicationAction) SyncComponents

func (a *ApplicationAction) SyncComponents(app *dbmodel.Application, components []*model.Component, deleteComponentIDs []string) error

SyncComponents -

func (*ApplicationAction) UpdateApp

UpdateApp -

func (*ApplicationAction) UpdateConfigGroup

func (a *ApplicationAction) UpdateConfigGroup(appID, configGroupName string, req *model.UpdateAppConfigGroupReq) (*model.ApplicationConfigGroupResp, error)

UpdateConfigGroup -

type ApplicationHandler

type ApplicationHandler interface {
	CreateApp(ctx context.Context, req *model.Application) (*model.Application, error)
	BatchCreateApp(ctx context.Context, req *model.CreateAppRequest, tenantEnvID string) ([]model.CreateAppResponse, error)
	UpdateApp(ctx context.Context, app *dbmodel.Application, req model.UpdateAppRequest) (*dbmodel.Application, error)
	ListApps(tenantEnvID, appName string, page, pageSize int) (*model.ListAppResponse, error)
	GetAppByID(appID string) (*dbmodel.Application, error)
	BatchBindService(appID string, req model.BindServiceRequest) error
	DeleteApp(ctx context.Context, app *dbmodel.Application) error

	AddConfigGroup(appID string, req *model.ApplicationConfigGroup) (*model.ApplicationConfigGroupResp, error)
	UpdateConfigGroup(appID, configGroupName string, req *model.UpdateAppConfigGroupReq) (*model.ApplicationConfigGroupResp, error)

	BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error
	GetStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error)
	Install(ctx context.Context, app *dbmodel.Application, overrides []string) error
	ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error)
	ListHelmAppReleases(ctx context.Context, app *dbmodel.Application) ([]*model.HelmAppRelease, error)

	DeleteConfigGroup(appID, configGroupName string) error
	ListConfigGroups(appID string, page, pageSize int) (*model.ListApplicationConfigGroupResp, error)
	SyncComponents(app *dbmodel.Application, components []*model.Component, deleteComponentIDs []string) error
	SyncComponentConfigGroupRels(tx *gorm.DB, app *dbmodel.Application, components []*model.Component) error
	SyncAppConfigGroups(app *dbmodel.Application, appConfigGroups []model.AppConfigGroup) error
	ListAppStatuses(ctx context.Context, appIDs []string) ([]*model.AppStatus, error)
	CheckGovernanceMode(ctx context.Context, governanceMode string) error
	ChangeVolumes(app *dbmodel.Application) error
	GetKubeResources(namespace string, serviceAliases []string, customSetting model.KubeResourceCustomSetting) (string, error)
}

ApplicationHandler defines handler methods to TenantEnvApplication.

func GetApplicationHandler

func GetApplicationHandler() ApplicationHandler

GetApplicationHandler returns the default tenant env application handler.

func NewApplicationHandler

func NewApplicationHandler(statusCli *client.AppRuntimeSyncClient, promClient prometheus.Interface, wutongClient versioned.Interface, kubeClient clientset.Interface) ApplicationHandler

NewApplicationHandler creates a new TenantEnv Application Handler.

type BatchOperationHandler

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

BatchOperationHandler batch operation handler

func CreateBatchOperationHandler

func CreateBatchOperationHandler(mqCli gclient.MQClient, statusCli *client.AppRuntimeSyncClient, operationHandler *OperationHandler) *BatchOperationHandler

CreateBatchOperationHandler create batch operation handler

func GetBatchOperationHandler

func GetBatchOperationHandler() *BatchOperationHandler

GetBatchOperationHandler get handler

func (*BatchOperationHandler) Build

func (b *BatchOperationHandler) Build(ctx context.Context, tenantEnv *dbmodel.TenantEnvs, operator string, batchOpReqs model.BatchOpRequesters) (model.BatchOpResult, error)

Build build

func (*BatchOperationHandler) Start

func (b *BatchOperationHandler) Start(ctx context.Context, tenantEnv *dbmodel.TenantEnvs, operator string, batchOpReqs model.BatchOpRequesters) (model.BatchOpResult, error)

Start batch start

func (*BatchOperationHandler) Stop

func (b *BatchOperationHandler) Stop(ctx context.Context, tenantEnv *dbmodel.TenantEnvs, operator string, batchOpReqs model.BatchOpRequesters) (model.BatchOpResult, error)

Stop batch stop

func (*BatchOperationHandler) Upgrade

func (b *BatchOperationHandler) Upgrade(ctx context.Context, tenantEnv *dbmodel.TenantEnvs, operator string, batchOpReqs model.BatchOpRequesters) (model.BatchOpResult, error)

Upgrade batch upgrade

type BatchOperationResult

type BatchOperationResult struct {
	BatchResult []OperationResult `json:"batche_result"`
}

BatchOperationResult batch operation result

type ClusterHandler

type ClusterHandler interface {
	GetClusterInfo(ctx context.Context) (*model.ClusterResource, error)
	GetClusterEvents(ctx context.Context) ([]model.ClusterEvent, error)
	MavenSettingAdd(ctx context.Context, ms *MavenSetting) *apiutil.APIHandleError
	MavenSettingList(ctx context.Context) (re []MavenSetting)
	MavenSettingUpdate(ctx context.Context, ms *MavenSetting) *apiutil.APIHandleError
	MavenSettingDelete(ctx context.Context, name string) *apiutil.APIHandleError
	MavenSettingDetail(ctx context.Context, name string) (*MavenSetting, *apiutil.APIHandleError)
	Features(ctx context.Context) map[string]bool
	ListStorageClasses(ctx context.Context) []model.StorageClass
}

ClusterHandler -

func GetClusterHandler

func GetClusterHandler() ClusterHandler

GetClusterHandler returns the default cluster handler.

func NewClusterHandler

func NewClusterHandler(clientset kubernetes.Interface, WtNamespace, prometheusEndpoint string) ClusterHandler

NewClusterHandler -

type ClusterResourceStats

type ClusterResourceStats struct {
	AllCPU        int64
	AllMemory     int64
	RequestCPU    int64
	RequestMemory int64
}

ClusterResourceStats cluster resource stats

type ComponentIngressTask

type ComponentIngressTask struct {
	ComponentID string `json:"service_id"`
	Action      string `json:"action"`
	Port        int    `json:"port"`
	IsInner     bool   `json:"is_inner"`
}

ComponentIngressTask -

type EtcdHandler

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

EtcdHandler defines handler methods about k8s pods.

func GetEtcdHandler

func GetEtcdHandler() *EtcdHandler

GetEtcdHandler returns the default etcd handler.

func NewEtcdHandler

func NewEtcdHandler(etcdCli *clientv3.Client) *EtcdHandler

NewEtcdHandler creates a new PodHandler.

func (*EtcdHandler) CleanAllServiceData

func (h *EtcdHandler) CleanAllServiceData(keys []string)

CleanAllServiceData -

func (*EtcdHandler) CleanServiceCheckData

func (h *EtcdHandler) CleanServiceCheckData(key string)

CleanServiceCheckData clean service check etcd data

type EtcdKeyType

type EtcdKeyType int

EtcdKeyType etcd key type

const (
	// ServiceCheckEtcdKey source check etcd key
	ServiceCheckEtcdKey EtcdKeyType = iota
	// ShareResultEtcdKey share result etcd key
	ShareResultEtcdKey
	//BackupRestoreEtcdKey backup restore etcd key
	BackupRestoreEtcdKey
)

type EventHandler

type EventHandler interface {
	GetLogList(serviceAlias string) ([]*model.HistoryLogFile, error)
	GetLogInstance(serviceID string) (string, error)
	GetLevelLog(eventID string, level string) (*model.DataLog, error)
	GetLogFile(serviceAlias, fileName string) (string, string, error)
	GetEvents(target, targetID string, page, size int) ([]*dbmodel.ServiceEvent, int, error)
}

EventHandler event handler interface

func GetEventHandler

func GetEventHandler() EventHandler

GetEventHandler get event handler

type GatewayAction

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

GatewayAction -

func CreateGatewayManager

func CreateGatewayManager(dbmanager db.Manager, mqclient client.MQClient, etcdCli *clientv3.Client) *GatewayAction

CreateGatewayManager creates gateway manager.

func (*GatewayAction) AddCertificate

func (g *GatewayAction) AddCertificate(req *apimodel.AddHTTPRuleStruct, tx *gorm.DB) error

AddCertificate adds certificate to db if it doesn't exists

func (*GatewayAction) AddHTTPRule

func (g *GatewayAction) AddHTTPRule(req *apimodel.AddHTTPRuleStruct) error

AddHTTPRule adds http rule to db if it doesn't exists.

func (*GatewayAction) AddRuleExtensions

func (g *GatewayAction) AddRuleExtensions(ruleID string, ruleExtensions []*apimodel.RuleExtensionStruct,
	tx *gorm.DB) error

AddRuleExtensions adds rule extensions to db if any of they doesn't exists

func (*GatewayAction) AddTCPRule

func (g *GatewayAction) AddTCPRule(req *apimodel.AddTCPRuleStruct) error

AddTCPRule adds tcp rule.

func (*GatewayAction) CreateHTTPRule

func (g *GatewayAction) CreateHTTPRule(tx *gorm.DB, req *apimodel.AddHTTPRuleStruct) error

CreateHTTPRule Create http rules through transactions

func (*GatewayAction) CreateTCPRule

func (g *GatewayAction) CreateTCPRule(tx *gorm.DB, req *apimodel.AddTCPRuleStruct) error

CreateTCPRule Create tcp rules through transactions

func (*GatewayAction) DeleteHTTPRule

func (g *GatewayAction) DeleteHTTPRule(req *apimodel.DeleteHTTPRuleStruct) error

DeleteHTTPRule deletes http rule, including certificate and rule extensions

func (*GatewayAction) DeleteHTTPRuleByServiceIDWithTransaction

func (g *GatewayAction) DeleteHTTPRuleByServiceIDWithTransaction(sid string, tx *gorm.DB) error

DeleteHTTPRuleByServiceIDWithTransaction deletes http rule, including certificate and rule extensions

func (*GatewayAction) DeleteIngressRulesByComponentPort

func (g *GatewayAction) DeleteIngressRulesByComponentPort(tx *gorm.DB, componentID string, port int) error

DeleteIngressRulesByComponentPort deletes ingress rules, including http rules and tcp rules, based on the given componentID and port.

func (*GatewayAction) DeleteTCPRule

func (g *GatewayAction) DeleteTCPRule(req *apimodel.DeleteTCPRuleStruct) error

DeleteTCPRule deletes a tcp rule

func (*GatewayAction) DeleteTCPRuleByServiceIDWithTransaction

func (g *GatewayAction) DeleteTCPRuleByServiceIDWithTransaction(sid string, tx *gorm.DB) error

DeleteTCPRuleByServiceIDWithTransaction deletes a tcp rule

func (*GatewayAction) GetAvailablePort

func (g *GatewayAction) GetAvailablePort(ip string, lock bool) (int, error)

GetAvailablePort returns a available port

func (*GatewayAction) GetGatewayIPs

func (g *GatewayAction) GetGatewayIPs() []IPAndAvailablePort

GetGatewayIPs get all gateway node ips

func (*GatewayAction) IsPortAvailable added in v1.7.0

func (g *GatewayAction) IsPortAvailable(ip string, port int) bool

func (*GatewayAction) ListHTTPRulesByCertID

func (g *GatewayAction) ListHTTPRulesByCertID(certID string) ([]*model.HTTPRule, error)

ListHTTPRulesByCertID -

func (*GatewayAction) RuleConfig

func (g *GatewayAction) RuleConfig(req *apimodel.RuleConfigReq) error

RuleConfig -

func (*GatewayAction) SendTask

func (g *GatewayAction) SendTask(task *ComponentIngressTask) error

SendTask sends apply rules task

func (*GatewayAction) SendTaskDeprecated

func (g *GatewayAction) SendTaskDeprecated(in map[string]interface{}) error

SendTaskDeprecated sends apply rules task

func (*GatewayAction) SyncHTTPRules

func (g *GatewayAction) SyncHTTPRules(tx *gorm.DB, components []*apimodel.Component) error

SyncHTTPRules -

func (*GatewayAction) SyncRuleConfigs

func (g *GatewayAction) SyncRuleConfigs(tx *gorm.DB, components []*apimodel.Component) error

SyncRuleConfigs -

func (*GatewayAction) SyncTCPRules

func (g *GatewayAction) SyncTCPRules(tx *gorm.DB, components []*apimodel.Component) error

SyncTCPRules -

func (*GatewayAction) TCPIPPortExists

func (g *GatewayAction) TCPIPPortExists(host string, port int) bool

TCPIPPortExists returns if the port exists

func (*GatewayAction) TCPRuleConfig added in v1.1.0

func (g *GatewayAction) TCPRuleConfig(req *apimodel.TCPRuleConfigReq) error

TCPRuleConfig -

func (*GatewayAction) UpdCertificate

func (g *GatewayAction) UpdCertificate(req *apimodel.UpdCertificateReq) error

UpdCertificate -

func (*GatewayAction) UpdateCertificate

func (g *GatewayAction) UpdateCertificate(req apimodel.AddHTTPRuleStruct, httpRule *model.HTTPRule,
	tx *gorm.DB) error

UpdateCertificate updates certificate for http rule

func (*GatewayAction) UpdateHTTPRule

func (g *GatewayAction) UpdateHTTPRule(req *apimodel.UpdateHTTPRuleStruct) error

UpdateHTTPRule updates http rule

func (*GatewayAction) UpdateTCPRule

func (g *GatewayAction) UpdateTCPRule(req *apimodel.UpdateTCPRuleStruct, minPort int) error

UpdateTCPRule updates a tcp rule

type GatewayHandler

type GatewayHandler interface {
	AddHTTPRule(req *apimodel.AddHTTPRuleStruct) error
	CreateHTTPRule(tx *gorm.DB, req *apimodel.AddHTTPRuleStruct) error
	UpdateHTTPRule(req *apimodel.UpdateHTTPRuleStruct) error
	DeleteHTTPRule(req *apimodel.DeleteHTTPRuleStruct) error
	DeleteHTTPRuleByServiceIDWithTransaction(sid string, tx *gorm.DB) error

	AddCertificate(req *apimodel.AddHTTPRuleStruct, tx *gorm.DB) error
	UpdateCertificate(req apimodel.AddHTTPRuleStruct, httpRule *dbmodel.HTTPRule, tx *gorm.DB) error

	AddTCPRule(req *apimodel.AddTCPRuleStruct) error
	CreateTCPRule(tx *gorm.DB, req *apimodel.AddTCPRuleStruct) error
	UpdateTCPRule(req *apimodel.UpdateTCPRuleStruct, minPort int) error
	DeleteTCPRule(req *apimodel.DeleteTCPRuleStruct) error
	DeleteTCPRuleByServiceIDWithTransaction(sid string, tx *gorm.DB) error
	AddRuleExtensions(ruleID string, ruleExtensions []*apimodel.RuleExtensionStruct, tx *gorm.DB) error
	GetAvailablePort(ip string, lock bool) (int, error)
	IsPortAvailable(ip string, port int) bool
	TCPIPPortExists(ip string, port int) bool
	// Deprecated.
	SendTaskDeprecated(in map[string]interface{}) error
	SendTask(task *ComponentIngressTask) error
	RuleConfig(req *apimodel.RuleConfigReq) error
	TCPRuleConfig(req *apimodel.TCPRuleConfigReq) error
	UpdCertificate(req *apimodel.UpdCertificateReq) error
	GetGatewayIPs() []IPAndAvailablePort
	ListHTTPRulesByCertID(certID string) ([]*dbmodel.HTTPRule, error)
	DeleteIngressRulesByComponentPort(tx *gorm.DB, componentID string, port int) error
	SyncHTTPRules(tx *gorm.DB, components []*apimodel.Component) error
	SyncTCPRules(tx *gorm.DB, components []*apimodel.Component) error
	SyncRuleConfigs(tx *gorm.DB, components []*apimodel.Component) error
}

GatewayHandler gateway api handler

func GetGatewayHandler

func GetGatewayHandler() GatewayHandler

GetGatewayHandler returns a default GatewayHandler

type IPAndAvailablePort

type IPAndAvailablePort struct {
	IP            string `json:"ip"`
	AvailablePort int    `json:"available_port"`
}

IPAndAvailablePort ip and advice available port

type Info

type Info struct {
	Code       string   `json:"code"`
	Company    string   `json:"company"`
	Node       int64    `json:"node"`
	CPU        int64    `json:"cpu"`
	Memory     int64    `json:"memory"`
	TenantEnv  int64    `json:"tenant_env"`
	EndTime    string   `json:"end_time"`
	StartTime  string   `json:"start_time"`
	DataCenter int64    `json:"data_center"`
	ModuleList []string `json:"module_list"`
}

Info license 信息

func ReadLicenseFromFile

func ReadLicenseFromFile(licenseFile string) (Info, error)

ReadLicenseFromFile 从文件获取license

type K8sPodInfo

type K8sPodInfo struct {
	PodName   string                       `json:"pod_name"`
	PodIP     string                       `json:"pod_ip"`
	PodStatus string                       `json:"pod_status"`
	ServiceID string                       `json:"service_id"`
	Container map[string]map[string]string `json:"container"`
}

K8sPodInfo for api

type K8sPodInfos

type K8sPodInfos struct {
	NewPods []*K8sPodInfo `json:"new_pods"`
	OldPods []*K8sPodInfo `json:"old_pods"`
}

K8sPodInfos -

type LangInfo

type LangInfo struct {
	Lang  string `json:"lang"`
	Major []*MajorInfo
}

LangInfo LangInfo

type LicenseAction

type LicenseAction struct{}

LicenseAction LicenseAction

func (*LicenseAction) PackLicense

func (l *LicenseAction) PackLicense(encrypted string) ([]byte, error)

PackLicense PackLicense

func (*LicenseAction) StoreLicense

func (l *LicenseAction) StoreLicense(license, token string) error

StoreLicense StoreLicense

type LicenseHandler

type LicenseHandler interface {
	PackLicense(encrypted string) ([]byte, error)
	StoreLicense(license, token string) error
}

LicenseHandler LicenseAction

func GetLicenseHandler

func GetLicenseHandler() LicenseHandler

GetLicenseHandler get license handler

type LicenseInfoHandler

type LicenseInfoHandler interface {
	ShowInfos() (map[string]*api_model.LicenseInfo, error)
}

LicenseInfoHandler LicenseInfoHandler

func GetLicensesInfosHandler

func GetLicensesInfosHandler() LicenseInfoHandler

GetLicensesInfosHandler GetLicensesInfosHandler

type LicensesInfos

type LicensesInfos struct {
	Infos map[string]*api_model.LicenseInfo
}

LicensesInfos LicensesInfos 验证

func (*LicensesInfos) ShowInfos

func (l *LicensesInfos) ShowInfos() (map[string]*api_model.LicenseInfo, error)

ShowInfos ShowInfos

type LogAction

type LogAction struct {
	EtcdCli *clientv3.Client
	// contains filtered or unexported fields
}

LogAction log action struct

func CreateLogManager

func CreateLogManager(cli *clientv3.Client) *LogAction

CreateLogManager get log manager

func (*LogAction) GetEvents

func (l *LogAction) GetEvents(target, targetID string, page, size int) ([]*dbmodel.ServiceEvent, int, error)

GetEvents get target logs

func (*LogAction) GetLevelLog

func (l *LogAction) GetLevelLog(eventID string, level string) (*model.DataLog, error)

GetLevelLog get event log

func (*LogAction) GetLogFile

func (l *LogAction) GetLogFile(serviceAlias, fileName string) (string, string, error)

GetLogFile GetLogFile

func (*LogAction) GetLogInstance

func (l *LogAction) GetLogInstance(serviceID string) (string, error)

GetLogInstance get log web socket instance

func (*LogAction) GetLogList

func (l *LogAction) GetLogList(serviceAlias string) ([]*model.HistoryLogFile, error)

GetLogList get log list

type MajorInfo

type MajorInfo struct {
	Major int `json:"major"`
	Minor []*MinorInfo
}

MajorInfo MajorInfo

type MavenSetting

type MavenSetting struct {
	Name       string `json:"name" validate:"required"`
	CreateTime string `json:"create_time"`
	UpdateTime string `json:"update_time"`
	Content    string `json:"content" validate:"required"`
	IsDefault  bool   `json:"is_default"`
}

MavenSetting maven setting

type MinorInfo

type MinorInfo struct {
	Minor int   `json:"minor"`
	Patch []int `json:"patch"`
}

MinorInfo MinorInfo

type MonitorHandler

type MonitorHandler interface {
	GetTenantEnvMonitorMetrics(tenantEnvID string) []prometheus.Metadata
	GetAppMonitorMetrics(tenantEnvID, appID string) []prometheus.Metadata
	GetComponentMonitorMetrics(tenantEnvID, componentID string) []prometheus.Metadata
}

MonitorHandler monitor api handler

func GetMonitorHandle

func GetMonitorHandle() MonitorHandler

GetMonitorHandle get monitor handler

func NewMonitorHandler

func NewMonitorHandler(cli prometheus.Interface) MonitorHandler

NewMonitorHandler new monitor handler

type NetRulesAction

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

NetRulesAction rules action struct

func CreateNetRulesManager

func CreateNetRulesManager(etcdCli *clientv3.Client) *NetRulesAction

CreateNetRulesManager get net rules manager

func (*NetRulesAction) CreateDownStreamNetRules

func (n *NetRulesAction) CreateDownStreamNetRules(
	tenantEnvID string,
	rs *api_model.SetNetDownStreamRuleStruct) *util.APIHandleError

CreateDownStreamNetRules CreateDownStreamNetRules

func (*NetRulesAction) GetDownStreamNetRule

func (n *NetRulesAction) GetDownStreamNetRule(
	tenantEnvID,
	serviceAlias,
	destServiceAlias,
	port string) (*api_model.NetRulesDownStreamBody, *util.APIHandleError)

GetDownStreamNetRule GetDownStreamNetRule

func (*NetRulesAction) UpdateDownStreamNetRule

func (n *NetRulesAction) UpdateDownStreamNetRule(
	tenantEnvID string,
	urs *api_model.UpdateNetDownStreamRuleStruct) *util.APIHandleError

UpdateDownStreamNetRule UpdateDownStreamNetRule

type NetRulesHandler

type NetRulesHandler interface {
	CreateDownStreamNetRules(
		tenantEnvID string,
		rs *api_model.SetNetDownStreamRuleStruct) *util.APIHandleError
	GetDownStreamNetRule(
		tenantEnvID,
		serviceAlias,
		destServiceAlias,
		port string) (*api_model.NetRulesDownStreamBody, *util.APIHandleError)
	UpdateDownStreamNetRule(
		tenantEnvID string,
		urs *api_model.UpdateNetDownStreamRuleStruct) *util.APIHandleError
}

NetRulesHandler net rules handler

func GetRulesManager

func GetRulesManager() NetRulesHandler

GetRulesManager get manager

type NodeHandler added in v1.9.0

type NodeHandler interface {
	ListNodes(query string) (*model.ListNodeResponse, error)
	GetNode(nodeName string) (*model.GetNodeResponse, error)
	GetNodeLabels(nodeName string) ([]model.Label, error)
	GetCommonLabels(nodeName string) ([]model.Label, error)
	GetVMSchedulingLabels(nodeName string) ([]model.Label, error)
	SetNodeLabel(nodeName string, req *model.SetNodeLabelRequest) error
	DeleteNodeLabel(nodeName string, req *model.DeleteNodeLabelRequest) error
	GetNodeAnnotations(nodeName string) ([]model.Annotation, error)
	SetNodeAnnotation(nodeName string, req *model.SetNodeAnnotationRequest) error
	DeleteNodeAnnotation(nodeName string, req *model.DeleteNodeAnnotationRequest) error
	GetNodeTaints(nodeName string) ([]model.Taint, error)
	TaintNode(nodeName string, req *model.TaintNodeRequest) error
	DeleteTaintNode(nodeName string, req *model.DeleteTaintNodeRequest) error
	CordonNode(nodeName string, req *model.CordonNodeRequest) error
	UncordonNode(nodeName string) error
	SetVMSchedulingLabel(nodeName string, req *model.SetVMSchedulingLabelRequest) error
	DeleteVMSchedulingLabel(nodeName string, req *model.DeleteVMSchedulingLabelRequest) error
}

NodeHandler -

func GetNodeHandler added in v1.9.0

func GetNodeHandler() NodeHandler

GetVolumeTypeHandler returns the default volume type handler.

func NewNodeHandler added in v1.9.0

func NewNodeHandler(clientset kubernetes.Interface, promcli prometheus.Interface) NodeHandler

NewNodeHandler -

type NodeStorageMetric added in v1.1.0

type NodeStorageMetric struct {
	NodeName        string
	CapacityStorage int64
	UsedStorage     int64
}

type NodeStorageMetricsResponse added in v1.1.0

type NodeStorageMetricsResponse struct {
	Status string                         `json:"status"`
	Data   NodeStorageMetricsResponseData `json:"data"`
}

type NodeStorageMetricsResponseData added in v1.1.0

type NodeStorageMetricsResponseData struct {
	Result []NodeStorageMetricsResponseDataResult `json:"result"`
}

type NodeStorageMetricsResponseDataResult added in v1.1.0

type NodeStorageMetricsResponseDataResult struct {
	Metric NodeStorageMetricsResponseDataResultMetric `json:"metric"`
	Value  []interface{}                              `json:"value"`
}

type NodeStorageMetricsResponseDataResultMetric added in v1.1.0

type NodeStorageMetricsResponseDataResultMetric struct {
	Instance   string `json:"instance"`
	Mountpoint string `json:"mountpoint"`
}

type OperationHandler

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

OperationHandler operation handler

func CreateOperationHandler

func CreateOperationHandler(mqCli gclient.MQClient) *OperationHandler

CreateOperationHandler create operation handler

func GetOperationHandler

func GetOperationHandler() *OperationHandler

GetOperationHandler get handler

func (*OperationHandler) Build

Build service build,will create new version if deploy version not define, will create by time

func (*OperationHandler) RollBack

RollBack service rollback

func (*OperationHandler) Start

func (o *OperationHandler) Start(batchOpReq model.ComponentOpReq) error

Start service start

func (*OperationHandler) Stop

func (o *OperationHandler) Stop(batchOpReq model.ComponentOpReq) error

Stop service stop

func (*OperationHandler) Upgrade

Upgrade service upgrade

type OperationResult

type OperationResult struct {
	ServiceID     string `json:"service_id"`
	Operation     string `json:"operation"`
	EventID       string `json:"event_id"`
	Status        string `json:"status"`
	ErrMsg        string `json:"err_message"`
	DeployVersion string `json:"deploy_version"`
}

OperationResult batch operation result

type PluginAction

type PluginAction struct {
	MQClient client.MQClient
}

PluginAction plugin action struct

func CreatePluginManager

func CreatePluginManager(mqClient client.MQClient) *PluginAction

CreatePluginManager get plugin manager

func (*PluginAction) AddDefaultEnv

func (p *PluginAction) AddDefaultEnv(est *api_model.ENVStruct) *util.APIHandleError

AddDefaultEnv AddDefaultEnv

func (*PluginAction) BatchBuildPlugins

func (p *PluginAction) BatchBuildPlugins(req *api_model.BatchBuildPlugins, tenantEnvID string) *util.APIHandleError

BatchBuildPlugins -

func (*PluginAction) BatchCreatePlugins

func (p *PluginAction) BatchCreatePlugins(tenantEnvID string, plugins []*api_model.Plugin) *util.APIHandleError

BatchCreatePlugins -

func (*PluginAction) BuildPluginManual

BuildPluginManual BuildPluginManual

func (*PluginAction) CreatePluginAct

func (p *PluginAction) CreatePluginAct(cps *api_model.CreatePluginStruct) *util.APIHandleError

CreatePluginAct PluginAct

func (*PluginAction) DeleteDefaultEnv

func (p *PluginAction) DeleteDefaultEnv(pluginID, versionID, name string) *util.APIHandleError

DeleteDefaultEnv DeleteDefaultEnv

func (*PluginAction) DeletePluginAct

func (p *PluginAction) DeletePluginAct(pluginID, tenantEnvID string) *util.APIHandleError

DeletePluginAct DeletePluginAct

func (*PluginAction) DeletePluginBuildVersion

func (p *PluginAction) DeletePluginBuildVersion(pluginID, versionID string) *util.APIHandleError

DeletePluginBuildVersion DeletePluginBuildVersion

func (*PluginAction) GetAllPluginBuildVersions

func (p *PluginAction) GetAllPluginBuildVersions(pluginID string) ([]*dbmodel.TenantEnvPluginBuildVersion, *util.APIHandleError)

GetAllPluginBuildVersions GetAllPluginBuildVersions

func (*PluginAction) GetDefaultEnv

func (p *PluginAction) GetDefaultEnv(pluginID, versionID string) ([]*dbmodel.TenantEnvPluginDefaultENV, *util.APIHandleError)

GetDefaultEnv GetDefaultEnv

func (*PluginAction) GetEnvsWhichCanBeSet

func (p *PluginAction) GetEnvsWhichCanBeSet(serviceID, pluginID string) (interface{}, *util.APIHandleError)

GetEnvsWhichCanBeSet GetEnvsWhichCanBeSet

func (*PluginAction) GetPluginBuildVersion

func (p *PluginAction) GetPluginBuildVersion(pluginID, versionID string) (*dbmodel.TenantEnvPluginBuildVersion, *util.APIHandleError)

GetPluginBuildVersion GetPluginBuildVersion

func (*PluginAction) GetPlugins

func (p *PluginAction) GetPlugins(tenantEnvID string) ([]*dbmodel.TenantEnvPlugin, *util.APIHandleError)

GetPlugins get all plugins by tenantEnvID

func (*PluginAction) UpdateDefaultEnv

func (p *PluginAction) UpdateDefaultEnv(est *api_model.ENVStruct) *util.APIHandleError

UpdateDefaultEnv UpdateDefaultEnv

func (*PluginAction) UpdatePluginAct

func (p *PluginAction) UpdatePluginAct(pluginID, tenantEnvID string, cps *api_model.UpdatePluginStruct) *util.APIHandleError

UpdatePluginAct UpdatePluginAct

type PluginHandler

type PluginHandler interface {
	CreatePluginAct(cps *api_model.CreatePluginStruct) *util.APIHandleError
	UpdatePluginAct(pluginID, tenantEnvID string, cps *api_model.UpdatePluginStruct) *util.APIHandleError
	DeletePluginAct(pluginID, tenantEnvID string) *util.APIHandleError
	GetPlugins(tenantEnvID string) ([]*dbmodel.TenantEnvPlugin, *util.APIHandleError)
	AddDefaultEnv(est *api_model.ENVStruct) *util.APIHandleError
	UpdateDefaultEnv(est *api_model.ENVStruct) *util.APIHandleError
	DeleteDefaultEnv(pluginID, versionID, envName string) *util.APIHandleError
	BuildPluginManual(bps *api_model.BuildPluginStruct) (*dbmodel.TenantEnvPluginBuildVersion, *util.APIHandleError)
	GetAllPluginBuildVersions(pluginID string) ([]*dbmodel.TenantEnvPluginBuildVersion, *util.APIHandleError)
	GetPluginBuildVersion(pluginID, versionID string) (*dbmodel.TenantEnvPluginBuildVersion, *util.APIHandleError)
	DeletePluginBuildVersion(pluginID, versionID string) *util.APIHandleError
	GetDefaultEnv(pluginID, versionID string) ([]*dbmodel.TenantEnvPluginDefaultENV, *util.APIHandleError)
	GetEnvsWhichCanBeSet(serviceID, pluginID string) (interface{}, *util.APIHandleError)
	BatchCreatePlugins(tenantEnvID string, plugins []*api_model.Plugin) *util.APIHandleError
	BatchBuildPlugins(req *api_model.BatchBuildPlugins, tenantEnvID string) *util.APIHandleError
}

PluginHandler plugin handler

func GetPluginManager

func GetPluginManager() PluginHandler

GetPluginManager get manager

type PodAction

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

PodAction is an implementation of PodHandler

func (*PodAction) PodDetail

func (p *PodAction) PodDetail(namespace, podName string) (*pb.PodDetail, error)

PodDetail -

type PodHandler

type PodHandler interface {
	PodDetail(namespace, podName string) (*pb.PodDetail, error)
}

PodHandler defines handler methods about k8s pods.

func GetPodHandler

func GetPodHandler() PodHandler

GetPodHandler returns the defalut PodHandler

func NewPodHandler

func NewPodHandler(statusCli *client.AppRuntimeSyncClient) PodHandler

NewPodHandler creates a new PodHandler.

type QueryResult

type QueryResult struct {
	Data struct {
		Type   string                   `json:"resultType"`
		Result []map[string]interface{} `json:"result"`
	} `json:"data"`
	Status string `json:"status"`
}

QueryResult contains result data for a query.

type RegistryAuthSecretAction added in v1.1.0

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

RegistryAuthSecretAction -

func CreateRegistryAuthSecretManager added in v1.1.0

func CreateRegistryAuthSecretManager(dbmanager db.Manager, mqclient client.MQClient, etcdCli *clientv3.Client) *RegistryAuthSecretAction

CreateRegistryAuthSecretManager creates registry auth secret manager

func (*RegistryAuthSecretAction) AddOrUpdateRegistryAuthSecret added in v1.1.0

func (g *RegistryAuthSecretAction) AddOrUpdateRegistryAuthSecret(req *apimodel.AddOrUpdateRegistryAuthSecretStruct) error

AddOrUpdateRegistryAuthSecret adds or updates registry auth secret

func (*RegistryAuthSecretAction) DeleteRegistryAuthSecret added in v1.1.0

func (g *RegistryAuthSecretAction) DeleteRegistryAuthSecret(req *apimodel.DeleteRegistryAuthSecretStruct) error

DeleteRegistryAuthSecret deletes registry auth secret

type RegistryAuthSecretHandler added in v1.1.0

type RegistryAuthSecretHandler interface {
	AddOrUpdateRegistryAuthSecret(req *apimodel.AddOrUpdateRegistryAuthSecretStruct) error
	DeleteRegistryAuthSecret(req *apimodel.DeleteRegistryAuthSecretStruct) error
}

GatewayHandler gateway api handler

func GetRegistryAuthSecretHandler added in v1.1.0

func GetRegistryAuthSecretHandler() RegistryAuthSecretHandler

GetRegistryAuthSecretHandler -

type RootAction

type RootAction struct{}

RootAction root function action struct

func CreateRootFuncManager

func CreateRootFuncManager(conf option.Config) *RootAction

CreateRootFuncManager get root func manager

func (*RootAction) ResolvePHP

func (r *RootAction) ResolvePHP(cs *api_model.ComposerStruct) (string, error)

ResolvePHP php 应用构建

type RootFuncHandler

type RootFuncHandler interface {
}

RootFuncHandler root function handler interface

func GetRootFuncHandler

func GetRootFuncHandler() RootFuncHandler

GetRootFuncHandler get root handler

type SchedulingHandler added in v1.10.0

type SchedulingHandler interface {
	ListSchedulingNodes() (*model.ListSchedulingNodesResponse, error)
	ListSchedulingTaints() (*model.ListSchedulingTaintsResponse, error)

	ListVMSchedulingLabels() ([]string, error)
	ListSchedulingLabels() (*model.ListSchedulingLabelsResponse, error)
}

SchedulingHandler -

func GetSchedulingHandler added in v1.10.0

func GetSchedulingHandler() SchedulingHandler

func NewSchedulingHandler added in v1.10.0

func NewSchedulingHandler(clientset kubernetes.Interface) SchedulingHandler

NewSchedulingHandler -

type ServiceAction

type ServiceAction struct {
	MQClient gclient.MQClient
	EtcdCli  *clientv3.Client
	// contains filtered or unexported fields
}

ServiceAction service act

func CreateManager

func CreateManager(conf option.Config,
	mqClient gclient.MQClient,
	etcdCli *clientv3.Client,
	statusCli *client.AppRuntimeSyncClient,
	prometheusCli prometheus.Interface,
	wutongClient versioned.Interface,
	kubeClient kubernetes.Interface,
	dynamicClient dynamic.Interface,
	apiextClient apiextclient.Interface,
	veleroClient veleroversioned.Interface) *ServiceAction

CreateManager create Manger

func (*ServiceAction) AddAutoscalerRule

func (s *ServiceAction) AddAutoscalerRule(req *api_model.AutoscalerRuleReq) error

AddAutoscalerRule -

func (*ServiceAction) AddLabel

func (s *ServiceAction) AddLabel(l *api_model.LabelsStruct, serviceID string) error

AddLabel add labels

func (*ServiceAction) AddServiceMonitor

func (s *ServiceAction) AddServiceMonitor(tenantEnvID, serviceID string, add api_model.AddServiceMonitorRequestStruct) (*dbmodel.TenantEnvServiceMonitor, error)

AddServiceMonitor add service monitor

func (*ServiceAction) AddServiceSchedulingLabel added in v1.10.0

func (s *ServiceAction) AddServiceSchedulingLabel(serviceID string, req *model.AddServiceSchedulingLabelRequest) error

func (*ServiceAction) AddServiceSchedulingToleration added in v1.10.0

func (s *ServiceAction) AddServiceSchedulingToleration(serviceID string, req *model.AddServiceSchedulingTolerationRequest) error

func (*ServiceAction) AddVMPort added in v1.7.0

func (s *ServiceAction) AddVMPort(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.AddVMPortRequest) error

func (*ServiceAction) AddVMVolume added in v1.10.0

func (s *ServiceAction) AddVMVolume(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.AddVMVolumeRequest) error

func (*ServiceAction) BackupRecords added in v1.6.0

func (s *ServiceAction) BackupRecords(tenantEnvID, serviceID string) ([]*api_model.BackupRecord, error)

BackupRecords get velero backup histories

func (*ServiceAction) CodeCheck

func (s *ServiceAction) CodeCheck(c *api_model.CheckCodeStruct) error

CodeCheck code check

func (*ServiceAction) CreateBackup added in v1.6.0

func (s *ServiceAction) CreateBackup(tenantEnvID, serviceID string, req api_model.CreateBackupRequest) error

CreateBackup create backup for service resources and data

func (*ServiceAction) CreateBackupSchedule added in v1.6.0

func (s *ServiceAction) CreateBackupSchedule(tenantEnvID, serviceID string, req api_model.CreateBackupScheduleRequest) error

CreateBackupSchedule create backup schedule for service resources and data

func (*ServiceAction) CreatePorts

func (s *ServiceAction) CreatePorts(tenantEnvID, serviceID string, vps *api_model.ServicePorts) error

CreatePorts -

func (*ServiceAction) CreateRestore added in v1.6.0

func (s *ServiceAction) CreateRestore(tenantEnvID, serviceID string, req api_model.CreateRestoreRequest) error

CreateRestore create restore for service resources and data from backup

func (*ServiceAction) CreateTenantEnv added in v1.1.0

func (s *ServiceAction) CreateTenantEnv(t *dbmodel.TenantEnvs) error

CreateTenantEnv create tenantEnv

func (*ServiceAction) CreateTenantEnvIDAndName added in v1.1.0

func (s *ServiceAction) CreateTenantEnvIDAndName() (string, string, error)

CreateTenantEnvIDAndName create tenant_env_id and tenant_env_name

func (*ServiceAction) CreateVM added in v1.7.0

func (*ServiceAction) CreateVMPortGateway added in v1.7.0

func (s *ServiceAction) CreateVMPortGateway(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.CreateVMPortGatewayRequest) error

func (*ServiceAction) DeleteBackup added in v1.6.0

func (s *ServiceAction) DeleteBackup(serviceID, backupID string) error

DeleteBackup delete backup for service resources and data

func (*ServiceAction) DeleteBackupSchedule added in v1.6.0

func (s *ServiceAction) DeleteBackupSchedule(serviceID string) error

DeleteBackupSchedule

func (*ServiceAction) DeleteLabel

func (s *ServiceAction) DeleteLabel(l *api_model.LabelsStruct, serviceID string) error

DeleteLabel deletes label

func (*ServiceAction) DeletePluginConfig

func (s *ServiceAction) DeletePluginConfig(serviceID, pluginID string) *util.APIHandleError

DeletePluginConfig delete service plugin dynamic discovery config

func (*ServiceAction) DeleteRestore added in v1.6.0

func (s *ServiceAction) DeleteRestore(serviceID, restoreID string) error

DeleteRestore delete restore for service resources and data from backup

func (*ServiceAction) DeleteServiceMonitor

func (s *ServiceAction) DeleteServiceMonitor(tenantEnvID, serviceID, name string) (*dbmodel.TenantEnvServiceMonitor, error)

DeleteServiceMonitor delete

func (*ServiceAction) DeleteServiceSchedulingLabel added in v1.10.0

func (s *ServiceAction) DeleteServiceSchedulingLabel(service string, req *model.DeleteServiceSchedulingLabelRequest) error

func (*ServiceAction) DeleteServiceSchedulingToleration added in v1.10.0

func (s *ServiceAction) DeleteServiceSchedulingToleration(service string, req *model.DeleteServiceSchedulingTolerationRequest) error

func (*ServiceAction) DeleteVM added in v1.7.0

func (s *ServiceAction) DeleteVM(tenantEnv *dbmodel.TenantEnvs, vmID string) error

func (*ServiceAction) DeleteVMPort added in v1.7.0

func (s *ServiceAction) DeleteVMPort(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.DeleteVMPortRequest) error

func (*ServiceAction) DeleteVMPortGateway added in v1.7.0

func (s *ServiceAction) DeleteVMPortGateway(tenantEnv *dbmodel.TenantEnvs, vmID, gatewayID string) error

func (*ServiceAction) DeleteVMVolume added in v1.10.0

func (s *ServiceAction) DeleteVMVolume(tenantEnv *dbmodel.TenantEnvs, vmID, volumeName string) error

func (*ServiceAction) DisableVMPort added in v1.9.0

func (s *ServiceAction) DisableVMPort(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.DisableVMPortRequest) error

func (*ServiceAction) DisableVMPortGateway added in v1.9.0

func (s *ServiceAction) DisableVMPortGateway(tenantEnv *dbmodel.TenantEnvs, vmID, gatewayID string) error

func (*ServiceAction) DownloadBackup added in v1.6.0

func (s *ServiceAction) DownloadBackup(serviceID, backupID string) ([]byte, error)

DownloadBackup download backup data

func (*ServiceAction) EnableVMPort added in v1.9.0

func (s *ServiceAction) EnableVMPort(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.EnableVMPortRequest) error

func (*ServiceAction) EnvAttr

func (s *ServiceAction) EnvAttr(action string, at *dbmodel.TenantEnvServiceEnvVar) error

EnvAttr env attr

func (*ServiceAction) GetAllRunningServices added in v1.1.0

func (s *ServiceAction) GetAllRunningServices() ([]string, *apiutil.APIHandleError)

GetAllRunningServices get running services

func (*ServiceAction) GetAllServicesStatus added in v1.1.0

func (s *ServiceAction) GetAllServicesStatus() (*ServicesStatus, *apiutil.APIHandleError)

func (*ServiceAction) GetBackupSchedule added in v1.6.0

func (s *ServiceAction) GetBackupSchedule(tenantEnvID, serviceID string) (*api_model.BackupSchedule, bool)

GetBackupSchedule get velero backup schedule

func (*ServiceAction) GetComponentPodNums

func (s *ServiceAction) GetComponentPodNums(ctx context.Context, componentIDs []string) (map[string]int32, error)

GetComponentPodNums get pods

func (*ServiceAction) GetDepVolumes

GetDepVolumes 获取依赖存储

func (*ServiceAction) GetKubeResources added in v1.1.0

func (s *ServiceAction) GetKubeResources(namespace, serviceID string, customSetting api_model.KubeResourceCustomSetting) (string, error)

GetKubeResources get kube resources for component

func (*ServiceAction) GetMultiServicePods

func (s *ServiceAction) GetMultiServicePods(serviceIDs []string) (*K8sPodInfos, error)

GetMultiServicePods get pods

func (*ServiceAction) GetPagedTenantEnvRes added in v1.1.0

func (s *ServiceAction) GetPagedTenantEnvRes(offset, len int) ([]*api_model.TenantEnvResource, int, error)

GetPagedTenantEnvRes get pagedTenantEnvServiceRes(s)

func (*ServiceAction) GetPodContainerCPU added in v1.1.0

func (s *ServiceAction) GetPodContainerCPU(podNames []string) (map[string]map[string]string, error)

GetPodContainerCPU Use Prometheus to query cpu resources

func (*ServiceAction) GetPodContainerMemory

func (s *ServiceAction) GetPodContainerMemory(podNames []string) (map[string]map[string]string, error)

GetPodContainerMemory Use Prometheus to query memory resources

func (*ServiceAction) GetPods

func (s *ServiceAction) GetPods(serviceID string) (*K8sPodInfos, error)

GetPods get pods

func (*ServiceAction) GetService

func (s *ServiceAction) GetService(tenantEnvID string) ([]*dbmodel.TenantEnvServices, error)

GetService get service(s)

func (*ServiceAction) GetServiceCheckInfo

func (s *ServiceAction) GetServiceCheckInfo(uuid string) (*exector.ServiceCheckResult, *util.APIHandleError)

GetServiceCheckInfo get application source detection information

func (*ServiceAction) GetServiceDeployInfo

func (s *ServiceAction) GetServiceDeployInfo(tenantEnvID, serviceID string) (*pb.DeployInfo, *apiutil.APIHandleError)

GetServiceDeployInfo get service deploy info

func (*ServiceAction) GetServiceSchedulingDetails added in v1.10.0

func (s *ServiceAction) GetServiceSchedulingDetails(serviceID string) (*model.GetServiceSchedulingDetailsResponse, error)

func (*ServiceAction) GetServicesByAppID

func (s *ServiceAction) GetServicesByAppID(appID string, page, pageSize int) (*api_model.ListServiceResponse, error)

GetServicesByAppID get service(s) by appID

func (*ServiceAction) GetServicesStatus

func (s *ServiceAction) GetServicesStatus(tenantEnvID string, serviceIDs []string) []map[string]interface{}

GetServicesStatus 获取一组应用状态,若 serviceIDs为空,获取租户所有应用状态

func (*ServiceAction) GetStatus

func (s *ServiceAction) GetStatus(serviceID string) (*api_model.StatusList, error)

GetStatus GetStatus

func (*ServiceAction) GetTenantEnvRes added in v1.1.0

func (s *ServiceAction) GetTenantEnvRes(uuid string) (*api_model.TenantEnvResource, error)

GetTenantEnvRes get pagedTenantEnvServiceRes(s)

func (*ServiceAction) GetTenantEnvServicePluginRelation added in v1.1.0

func (s *ServiceAction) GetTenantEnvServicePluginRelation(serviceID string) ([]*dbmodel.TenantEnvServicePluginRelation, *util.APIHandleError)

GetTenantEnvServicePluginRelation GetTenantEnvServicePluginRelation

func (*ServiceAction) GetVM added in v1.7.0

func (s *ServiceAction) GetVM(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.GetVMResponse, error)

func (*ServiceAction) GetVMConditions added in v1.11.0

func (s *ServiceAction) GetVMConditions(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.GetVMConditionsResponse, error)

func (*ServiceAction) GetVMPorts added in v1.7.0

func (s *ServiceAction) GetVMPorts(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.GetVMPortsResponse, error)

func (*ServiceAction) GetVolumes

GetVolumes 获取应用全部存储

func (*ServiceAction) LanguageSet

func (s *ServiceAction) LanguageSet(langS *api_model.LanguageSet) error

LanguageSet language set

func (*ServiceAction) ListScalingRecords

func (s *ServiceAction) ListScalingRecords(serviceID string, page, pageSize int) ([]*dbmodel.TenantEnvServiceScalingRecords, int, error)

ListScalingRecords -

func (*ServiceAction) ListVMVolumes added in v1.10.0

func (s *ServiceAction) ListVMVolumes(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.ListVMVolumesResponse, error)

func (*ServiceAction) ListVMs added in v1.7.0

func (s *ServiceAction) ListVMs(tenantEnv *dbmodel.TenantEnvs) (*api_model.ListVMsResponse, error)

func (*ServiceAction) ListVersionInfo

func (s *ServiceAction) ListVersionInfo(serviceID string) (*api_model.BuildListRespVO, error)

ListVersionInfo lists version info

func (*ServiceAction) Log

func (s *ServiceAction) Log(w http.ResponseWriter, r *http.Request, component *dbmodel.TenantEnvServices, podName, containerName string, follow bool) error

Log returns the logs reader for a container in a pod, a pod or a component.

func (*ServiceAction) PortInner

func (s *ServiceAction) PortInner(tenantEnvName, serviceID, operation string, port int) error

PortInner 端口对内服务操作 TODO: send task to worker

func (*ServiceAction) PortOuter

func (s *ServiceAction) PortOuter(tenantEnvName, serviceID string, containerPort int,
	servicePort *api_model.ServicePortInnerOrOuter) (*dbmodel.TenantEnvServiceLBMappingPort, string, error)

PortOuter 端口对外服务操作

func (*ServiceAction) PortVar

func (s *ServiceAction) PortVar(action, tenantEnvID, serviceID string, vps *api_model.ServicePorts, oldPort int) error

PortVar port var

func (*ServiceAction) RestartVM added in v1.7.0

func (s *ServiceAction) RestartVM(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.RestartVMResponse, error)

func (*ServiceAction) RestoreRecords added in v1.6.0

func (s *ServiceAction) RestoreRecords(tenantEnvID, serviceID string) ([]*api_model.RestoreRecord, error)

RestoreRecords get velero restore histories

func (*ServiceAction) RollBack

func (s *ServiceAction) RollBack(rs *api_model.RollbackStruct) error

RollBack RollBack

func (*ServiceAction) SavePluginConfig

func (s *ServiceAction) SavePluginConfig(serviceID, pluginID string, config *api_model.ResourceSpec) *util.APIHandleError

SavePluginConfig save plugin dynamic discovery config

func (*ServiceAction) ServiceBuild

func (s *ServiceAction) ServiceBuild(tenantEnvID, serviceID string, r *api_model.BuildServiceStruct) error

ServiceBuild service build

func (*ServiceAction) ServiceCheck

ServiceCheck check service build source

func (*ServiceAction) ServiceCreate

func (s *ServiceAction) ServiceCreate(sc *api_model.ServiceStruct) error

ServiceCreate create service

func (*ServiceAction) ServiceDepend

func (s *ServiceAction) ServiceDepend(action string, ds *api_model.DependService) error

ServiceDepend service depend

func (*ServiceAction) ServiceHorizontal

func (s *ServiceAction) ServiceHorizontal(hs *model.HorizontalScalingTaskBody) error

ServiceHorizontal Service Horizontal

func (*ServiceAction) ServiceProbe

func (s *ServiceAction) ServiceProbe(tsp *dbmodel.TenantEnvServiceProbe, action string) error

ServiceProbe ServiceProbe

func (*ServiceAction) ServiceUpdate

func (s *ServiceAction) ServiceUpdate(sc map[string]interface{}) error

ServiceUpdate update service

func (*ServiceAction) ServiceUpgrade

func (s *ServiceAction) ServiceUpgrade(ru *model.RollingUpgradeTaskBody) error

ServiceUpgrade service upgrade

func (*ServiceAction) ServiceVertical

func (s *ServiceAction) ServiceVertical(ctx context.Context, vs *model.VerticalScalingTaskBody) error

ServiceVertical vertical service

func (*ServiceAction) SetServiceSchedulingNode added in v1.10.0

func (s *ServiceAction) SetServiceSchedulingNode(serviceID string, req *model.SetServiceSchedulingNodeRequest) error

func (*ServiceAction) SetTenantEnvServicePluginRelation added in v1.1.0

func (s *ServiceAction) SetTenantEnvServicePluginRelation(tenantEnvID, serviceID string, pss *api_model.PluginSetStruct) (*dbmodel.TenantEnvServicePluginRelation, *util.APIHandleError)

SetTenantEnvServicePluginRelation SetTenantEnvServicePluginRelation

func (*ServiceAction) StartStopService

func (s *ServiceAction) StartStopService(sss *api_model.StartStopStruct) error

StartStopService start service

func (*ServiceAction) StartVM added in v1.7.0

func (s *ServiceAction) StartVM(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.StartVMResponse, error)

func (*ServiceAction) StopVM added in v1.7.0

func (s *ServiceAction) StopVM(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.StopVMResponse, error)

func (*ServiceAction) SyncComponentBase

func (s *ServiceAction) SyncComponentBase(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error

SyncComponentBase -

func (*ServiceAction) SyncComponentConfigFiles

func (s *ServiceAction) SyncComponentConfigFiles(tx *gorm.DB, components []*api_model.Component) error

SyncComponentConfigFiles -

func (*ServiceAction) SyncComponentEndpoints

func (s *ServiceAction) SyncComponentEndpoints(tx *gorm.DB, components []*api_model.Component) error

SyncComponentEndpoints -

func (*ServiceAction) SyncComponentEnvs

func (s *ServiceAction) SyncComponentEnvs(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error

SyncComponentEnvs -

func (*ServiceAction) SyncComponentLabels

func (s *ServiceAction) SyncComponentLabels(tx *gorm.DB, components []*api_model.Component) error

SyncComponentLabels -

func (*ServiceAction) SyncComponentMonitors

func (s *ServiceAction) SyncComponentMonitors(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error

SyncComponentMonitors -

func (*ServiceAction) SyncComponentPlugins

func (s *ServiceAction) SyncComponentPlugins(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error

SyncComponentPlugins -

func (*ServiceAction) SyncComponentPorts

func (s *ServiceAction) SyncComponentPorts(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error

SyncComponentPorts -

func (*ServiceAction) SyncComponentProbes

func (s *ServiceAction) SyncComponentProbes(tx *gorm.DB, components []*api_model.Component) error

SyncComponentProbes -

func (*ServiceAction) SyncComponentRelations

func (s *ServiceAction) SyncComponentRelations(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error

SyncComponentRelations -

func (*ServiceAction) SyncComponentScaleRules

func (s *ServiceAction) SyncComponentScaleRules(tx *gorm.DB, components []*api_model.Component) error

SyncComponentScaleRules -

func (*ServiceAction) SyncComponentVolumeRels

func (s *ServiceAction) SyncComponentVolumeRels(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error

SyncComponentVolumeRels -

func (*ServiceAction) SyncComponentVolumes

func (s *ServiceAction) SyncComponentVolumes(tx *gorm.DB, components []*api_model.Component) error

SyncComponentVolumes -

func (*ServiceAction) TenantEnvServiceDeletePluginRelation added in v1.1.0

func (s *ServiceAction) TenantEnvServiceDeletePluginRelation(tenantEnvID, serviceID, pluginID string) *util.APIHandleError

TenantEnvServiceDeletePluginRelation uninstall plugin for app

func (*ServiceAction) TransServieToDelete

func (s *ServiceAction) TransServieToDelete(ctx context.Context, tenantEnvID, serviceID string) error

TransServieToDelete trans service info to delete table

func (*ServiceAction) UpdAutoscalerRule

func (s *ServiceAction) UpdAutoscalerRule(req *api_model.AutoscalerRuleReq) error

UpdAutoscalerRule -

func (*ServiceAction) UpdVolume

func (s *ServiceAction) UpdVolume(sid string, req *api_model.UpdVolumeReq) error

UpdVolume updates service volume.

func (*ServiceAction) UpdateBackupSchedule added in v1.7.0

func (s *ServiceAction) UpdateBackupSchedule(tenantEnvID, serviceID string, req api_model.UpdateBackupScheduleRequest) error

UpdateBackupSchedule update backup schedule for service resources and data

func (*ServiceAction) UpdateLabel

func (s *ServiceAction) UpdateLabel(l *api_model.LabelsStruct, serviceID string) error

UpdateLabel updates labels

func (*ServiceAction) UpdateServiceMonitor

func (s *ServiceAction) UpdateServiceMonitor(tenantEnvID, serviceID, name string, update api_model.UpdateServiceMonitorRequestStruct) (*dbmodel.TenantEnvServiceMonitor, error)

UpdateServiceMonitor update service monitor

func (*ServiceAction) UpdateServiceSchedulingLabel added in v1.10.0

func (s *ServiceAction) UpdateServiceSchedulingLabel(serviceID string, req *model.UpdateServiceSchedulingLabelRequest) error

func (*ServiceAction) UpdateServiceSchedulingToleration added in v1.10.0

func (s *ServiceAction) UpdateServiceSchedulingToleration(serviceID string, req *model.UpdateServiceSchedulingTolerationRequest) error

func (*ServiceAction) UpdateTenantEnvServicePluginRelation added in v1.1.0

func (s *ServiceAction) UpdateTenantEnvServicePluginRelation(serviceID string, pss *api_model.PluginSetStruct) (*dbmodel.TenantEnvServicePluginRelation, *util.APIHandleError)

UpdateTenantEnvServicePluginRelation UpdateTenantEnvServicePluginRelation

func (*ServiceAction) UpdateVM added in v1.7.0

func (*ServiceAction) UpdateVMPortGateway added in v1.7.0

func (s *ServiceAction) UpdateVMPortGateway(tenantEnv *dbmodel.TenantEnvs, vmID, gatewayID string, req *api_model.UpdateVMPortGatewayRequest) error

func (*ServiceAction) UpdateVersionEnv

func (s *ServiceAction) UpdateVersionEnv(uve *api_model.SetVersionEnv) *util.APIHandleError

UpdateVersionEnv UpdateVersionEnv

func (*ServiceAction) VolumeDependency

VolumeDependency VolumeDependency

func (*ServiceAction) VolumnVar

func (s *ServiceAction) VolumnVar(tsv *dbmodel.TenantEnvServiceVolume, tenantEnvID, fileContent, action string) *apiutil.APIHandleError

VolumnVar var volumn

type ServiceDependency

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

ServiceDependency documents a set of services and their dependencies. provides the ability to build linked lists of dependencies and find circular dependencies.

func NewServiceDependency

func NewServiceDependency(serviceIDs []string) (*ServiceDependency, error)

NewServiceDependency creates a new ServiceDependency.

type ServiceEventHandler

type ServiceEventHandler struct {
}

ServiceEventHandler -

func GetServiceEventHandler

func GetServiceEventHandler() *ServiceEventHandler

GetServiceEventHandler -

func NewServiceEventHandler

func NewServiceEventHandler() *ServiceEventHandler

NewServiceEventHandler -

func (*ServiceEventHandler) ListByEventIDs

func (s *ServiceEventHandler) ListByEventIDs(eventIDs []string) ([]*dbmodel.ServiceEvent, error)

ListByEventIDs -

type ServiceHandler

type ServiceHandler interface {
	ServiceBuild(tenantEnvID, serviceID string, r *api_model.BuildServiceStruct) error
	AddLabel(l *api_model.LabelsStruct, serviceID string) error
	DeleteLabel(l *api_model.LabelsStruct, serviceID string) error
	UpdateLabel(l *api_model.LabelsStruct, serviceID string) error
	StartStopService(s *api_model.StartStopStruct) error
	ServiceVertical(ctx context.Context, v *model.VerticalScalingTaskBody) error
	ServiceHorizontal(h *model.HorizontalScalingTaskBody) error
	ServiceUpgrade(r *model.RollingUpgradeTaskBody) error
	ServiceCreate(ts *api_model.ServiceStruct) error
	ServiceUpdate(sc map[string]interface{}) error
	LanguageSet(langS *api_model.LanguageSet) error
	GetService(tenantEnvID string) ([]*dbmodel.TenantEnvServices, error)
	GetServicesByAppID(appID string, page, pageSize int) (*api_model.ListServiceResponse, error)
	GetPagedTenantEnvRes(offset, len int) ([]*api_model.TenantEnvResource, int, error)
	GetTenantEnvRes(uuid string) (*api_model.TenantEnvResource, error)
	CodeCheck(c *api_model.CheckCodeStruct) error
	ServiceDepend(action string, ds *api_model.DependService) error
	EnvAttr(action string, at *dbmodel.TenantEnvServiceEnvVar) error
	PortVar(action string, tenantEnvID, serviceID string, vp *api_model.ServicePorts, oldPort int) error
	CreatePorts(tenantEnvID, serviceID string, vps *api_model.ServicePorts) error
	PortOuter(tenantEnvName, serviceID string, containerPort int, servicePort *api_model.ServicePortInnerOrOuter) (*dbmodel.TenantEnvServiceLBMappingPort, string, error)
	PortInner(tenantEnvName, serviceID, operation string, port int) error
	VolumnVar(avs *dbmodel.TenantEnvServiceVolume, tenantEnvID, fileContent, action string) *util.APIHandleError
	UpdVolume(sid string, req *api_model.UpdVolumeReq) error
	VolumeDependency(tsr *dbmodel.TenantEnvServiceMountRelation, action string) *util.APIHandleError
	GetDepVolumes(serviceID string) ([]*dbmodel.TenantEnvServiceMountRelation, *util.APIHandleError)
	GetVolumes(serviceID string) ([]*api_model.VolumeWithStatusStruct, *util.APIHandleError)
	ServiceProbe(tsp *dbmodel.TenantEnvServiceProbe, action string) error
	RollBack(rs *api_model.RollbackStruct) error
	GetStatus(serviceID string) (*api_model.StatusList, error)
	GetServicesStatus(tenantEnvID string, services []string) []map[string]interface{}
	GetAllRunningServices() ([]string, *util.APIHandleError)
	GetAllServicesStatus() (*ServicesStatus, *util.APIHandleError)
	CreateTenantEnv(*dbmodel.TenantEnvs) error
	CreateTenantEnvIDAndName() (string, string, error)
	GetPods(serviceID string) (*K8sPodInfos, error)
	GetMultiServicePods(serviceIDs []string) (*K8sPodInfos, error)
	GetComponentPodNums(ctx context.Context, componentIDs []string) (map[string]int32, error)
	TransServieToDelete(ctx context.Context, tenantEnvID, serviceID string) error
	TenantEnvServiceDeletePluginRelation(tenantEnvID, serviceID, pluginID string) *util.APIHandleError
	GetTenantEnvServicePluginRelation(serviceID string) ([]*dbmodel.TenantEnvServicePluginRelation, *util.APIHandleError)
	SetTenantEnvServicePluginRelation(tenantEnvID, serviceID string, pss *api_model.PluginSetStruct) (*dbmodel.TenantEnvServicePluginRelation, *util.APIHandleError)
	UpdateTenantEnvServicePluginRelation(serviceID string, pss *api_model.PluginSetStruct) (*dbmodel.TenantEnvServicePluginRelation, *util.APIHandleError)
	UpdateVersionEnv(uve *api_model.SetVersionEnv) *util.APIHandleError
	DeletePluginConfig(serviceID, pluginID string) *util.APIHandleError
	ServiceCheck(*api_model.ServiceCheckStruct) (string, string, *util.APIHandleError)
	GetServiceCheckInfo(uuid string) (*exector.ServiceCheckResult, *util.APIHandleError)
	GetServiceDeployInfo(tenantEnvID, serviceID string) (*pb.DeployInfo, *util.APIHandleError)
	ListVersionInfo(serviceID string) (*api_model.BuildListRespVO, error)

	AddAutoscalerRule(req *api_model.AutoscalerRuleReq) error
	UpdAutoscalerRule(req *api_model.AutoscalerRuleReq) error
	ListScalingRecords(serviceID string, page, pageSize int) ([]*dbmodel.TenantEnvServiceScalingRecords, int, error)

	UpdateServiceMonitor(tenantEnvID, serviceID, name string, update api_model.UpdateServiceMonitorRequestStruct) (*dbmodel.TenantEnvServiceMonitor, error)
	DeleteServiceMonitor(tenantEnvID, serviceID, name string) (*dbmodel.TenantEnvServiceMonitor, error)
	AddServiceMonitor(tenantEnvID, serviceID string, add api_model.AddServiceMonitorRequestStruct) (*dbmodel.TenantEnvServiceMonitor, error)

	SyncComponentBase(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error
	SyncComponentMonitors(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error
	SyncComponentPorts(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error
	SyncComponentRelations(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error
	SyncComponentEnvs(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error
	SyncComponentVolumeRels(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error
	SyncComponentVolumes(tx *gorm.DB, components []*api_model.Component) error
	SyncComponentConfigFiles(tx *gorm.DB, components []*api_model.Component) error
	SyncComponentProbes(tx *gorm.DB, components []*api_model.Component) error
	SyncComponentLabels(tx *gorm.DB, components []*api_model.Component) error
	SyncComponentPlugins(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error
	SyncComponentScaleRules(tx *gorm.DB, components []*api_model.Component) error
	SyncComponentEndpoints(tx *gorm.DB, components []*api_model.Component) error

	Log(w http.ResponseWriter, r *http.Request, component *dbmodel.TenantEnvServices, podName, containerName string, follow bool) error

	GetKubeResources(namespace, serviceID string, customSetting api_model.KubeResourceCustomSetting) (string, error)

	// Velero integration
	CreateBackup(tenantEnvID, serviceID string, req api_model.CreateBackupRequest) error
	CreateBackupSchedule(tenantEnvID, serviceID string, req api_model.CreateBackupScheduleRequest) error
	UpdateBackupSchedule(tenantEnvID, serviceID string, req api_model.UpdateBackupScheduleRequest) error
	DeleteBackupSchedule(serviceID string) error
	DownloadBackup(serviceID, backupID string) ([]byte, error)
	DeleteBackup(serviceID, backupID string) error
	CreateRestore(tenantEnvID, serviceID string, req api_model.CreateRestoreRequest) error
	DeleteRestore(serviceID, restoreID string) error
	BackupRecords(tenantEnvID, serviceID string) ([]*api_model.BackupRecord, error)
	RestoreRecords(tenantEnvID, serviceID string) ([]*api_model.RestoreRecord, error)
	GetBackupSchedule(tenantEnvID, serviceID string) (*api_model.BackupSchedule, bool)

	// Kubevirt integration
	CreateVM(tenantEnv *dbmodel.TenantEnvs, req *api_model.CreateVMRequest) (*api_model.CreateVMResponse, error)
	GetVM(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.GetVMResponse, error)
	GetVMConditions(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.GetVMConditionsResponse, error)
	UpdateVM(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.UpdateVMRequest) (*api_model.UpdateVMResponse, error)
	StartVM(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.StartVMResponse, error)
	StopVM(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.StopVMResponse, error)
	RestartVM(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.RestartVMResponse, error)
	AddVMPort(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.AddVMPortRequest) error
	GetVMPorts(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.GetVMPortsResponse, error)
	EnableVMPort(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.EnableVMPortRequest) error
	DisableVMPort(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.DisableVMPortRequest) error
	CreateVMPortGateway(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.CreateVMPortGatewayRequest) error
	UpdateVMPortGateway(tenantEnv *dbmodel.TenantEnvs, vmID, gatewayID string, req *api_model.UpdateVMPortGatewayRequest) error
	DeleteVMPortGateway(tenantEnv *dbmodel.TenantEnvs, vmID, gatewayID string) error
	DeleteVMPort(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.DeleteVMPortRequest) error
	DeleteVM(tenantEnv *dbmodel.TenantEnvs, vmID string) error
	ListVMs(tenantEnv *dbmodel.TenantEnvs) (*api_model.ListVMsResponse, error)
	ListVMVolumes(tenantEnv *dbmodel.TenantEnvs, vmID string) (*api_model.ListVMVolumesResponse, error)
	AddVMVolume(tenantEnv *dbmodel.TenantEnvs, vmID string, req *api_model.AddVMVolumeRequest) error
	DeleteVMVolume(tenantEnv *dbmodel.TenantEnvs, vmID, volumeName string) error

	// Scheduling
	GetServiceSchedulingDetails(serviceID string) (*api_model.GetServiceSchedulingDetailsResponse, error)
	AddServiceSchedulingLabel(serviceID string, req *api_model.AddServiceSchedulingLabelRequest) error
	UpdateServiceSchedulingLabel(serviceID string, req *api_model.UpdateServiceSchedulingLabelRequest) error
	DeleteServiceSchedulingLabel(serviceID string, req *api_model.DeleteServiceSchedulingLabelRequest) error
	SetServiceSchedulingNode(serviceID string, req *api_model.SetServiceSchedulingNodeRequest) error
	AddServiceSchedulingToleration(serviceID string, req *api_model.AddServiceSchedulingTolerationRequest) error
	UpdateServiceSchedulingToleration(serviceID string, req *api_model.UpdateServiceSchedulingTolerationRequest) error
	DeleteServiceSchedulingToleration(serviceID string, req *api_model.DeleteServiceSchedulingTolerationRequest) error
}

ServiceHandler service handler

func GetServiceManager

func GetServiceManager() ServiceHandler

GetServiceManager get manager

type ServicesStatus added in v1.1.0

type ServicesStatus struct {
	RunningServices   []string `json:"running_services"`
	UnRunningServices []string `json:"unrunning_services"`
	AbnormalServices  []string `json:"abnormal_services"`
}

type TenantEnvAction added in v1.1.0

type TenantEnvAction struct {
	MQClient mqclient.MQClient

	OptCfg *option.Config
	// contains filtered or unexported fields
}

TenantEnvAction tenant env act

func CreateTenantEnvManager added in v1.1.0

func CreateTenantEnvManager(mqc mqclient.MQClient, statusCli *client.AppRuntimeSyncClient,
	optCfg *option.Config,
	config *rest.Config,
	kubeClient kubernetes.Interface,
	prometheusCli prometheus.Interface,
	k8sClient k8sclient.Client) *TenantEnvAction

CreateTenantEnvManager create Manger

func (*TenantEnvAction) BindTenantEnvsResource added in v1.1.0

func (t *TenantEnvAction) BindTenantEnvsResource(source []*dbmodel.TenantEnvs) api_model.TenantEnvList

BindTenantEnvsResource query tenant env resource used and sort

func (*TenantEnvAction) CheckResourceName added in v1.1.0

CheckResourceName checks resource name.

func (*TenantEnvAction) DeleteTenantEnv added in v1.1.0

func (t *TenantEnvAction) DeleteTenantEnv(ctx context.Context, tenantEnvID string) error

DeleteTenantEnv deletes tenant env based on the given tenantEnvID.

tenant env can only be deleted without service or plugin

func (*TenantEnvAction) GetAllTenantEnvs added in v1.1.0

func (t *TenantEnvAction) GetAllTenantEnvs(query string) ([]*dbmodel.TenantEnvs, error)

CreateTenantEnv create tenant env

func (*TenantEnvAction) GetAllocatableResources added in v1.1.0

func (t *TenantEnvAction) GetAllocatableResources(ctx context.Context) (*ClusterResourceStats, error)

GetAllocatableResources returns allocatable cpu and memory (MB)

func (*TenantEnvAction) GetClusterResource added in v1.1.0

func (t *TenantEnvAction) GetClusterResource(ctx context.Context) *ClusterResourceStats

GetClusterResource get cluster resource

func (*TenantEnvAction) GetKubeConfig added in v1.1.0

func (t *TenantEnvAction) GetKubeConfig(namespace string) (string, error)

GetKubeConfig get kubeconfig from tenant env namespace by default dev rbac

func (*TenantEnvAction) GetKubeResources added in v1.1.0

func (s *TenantEnvAction) GetKubeResources(namespace, tenantEnvID string, customSetting api_model.KubeResourceCustomSetting) (string, error)

GetKubeResources get kube resources for tenantEnv

func (*TenantEnvAction) GetProtocols added in v1.1.0

func (t *TenantEnvAction) GetProtocols() ([]*dbmodel.RegionProcotols, *util.APIHandleError)

GetProtocols GetProtocols

func (*TenantEnvAction) GetServicesResources added in v1.1.0

func (t *TenantEnvAction) GetServicesResources(tr *api_model.ServicesResources) (re map[string]map[string]interface{}, err error)

GetServicesResources Gets the resource usage of the specified service.

func (*TenantEnvAction) GetServicesStatus added in v1.1.0

func (t *TenantEnvAction) GetServicesStatus(ids string) map[string]string

GetServicesStatus returns a list of service status matching ids.

func (*TenantEnvAction) GetTenantEnvResource added in v1.1.0

func (t *TenantEnvAction) GetTenantEnvResource(tenantEnvID string) (ts TenantEnvResourceStats, err error)

GetTenantEnvResource get tenant env resource

func (*TenantEnvAction) GetTenantEnvs added in v1.1.0

func (t *TenantEnvAction) GetTenantEnvs(tenantName, query string) ([]*dbmodel.TenantEnvs, error)

GetTenantEnvs get tenant envs

func (*TenantEnvAction) GetTenantEnvsByName added in v1.1.0

func (t *TenantEnvAction) GetTenantEnvsByName(tenantName, tenantEnvName string) (*dbmodel.TenantEnvs, error)

GetTenantEnvsByName get tenant envs

func (*TenantEnvAction) GetTenantEnvsByUUID added in v1.1.0

func (t *TenantEnvAction) GetTenantEnvsByUUID(uuid string) (*dbmodel.TenantEnvs, error)

GetTenantEnvsByUUID get tenantEnvs

func (*TenantEnvAction) GetTenantEnvsName added in v1.1.0

func (t *TenantEnvAction) GetTenantEnvsName(tenantName string) ([]string, error)

GetTenantEnvsName get tenant envs name

func (*TenantEnvAction) GetTenantEnvsResources added in v1.1.0

func (t *TenantEnvAction) GetTenantEnvsResources(ctx context.Context, tr *api_model.TenantEnvResources) (map[string]map[string]interface{}, error)

GetTenantEnvsResources Gets the resource usage of the specified tenantEnv.

func (*TenantEnvAction) IsClosedStatus added in v1.1.0

func (t *TenantEnvAction) IsClosedStatus(status string) bool

IsClosedStatus checks if the status is closed status.

func (*TenantEnvAction) StatsMemCPU added in v1.1.0

func (t *TenantEnvAction) StatsMemCPU(services []*dbmodel.TenantEnvServices) (*api_model.StatsInfo, error)

StatsMemCPU StatsMemCPU

func (*TenantEnvAction) TenantEnvsSum added in v1.1.0

func (t *TenantEnvAction) TenantEnvsSum(tenantName string) (int, error)

TenantEnvsSum TenantEnvsSum

func (*TenantEnvAction) TotalMemCPU added in v1.1.0

func (t *TenantEnvAction) TotalMemCPU(services []*dbmodel.TenantEnvServices) (*api_model.StatsInfo, error)

TotalMemCPU StatsMemCPU

func (*TenantEnvAction) TransPlugins added in v1.1.0

func (t *TenantEnvAction) TransPlugins(tenantEnvID, tenantEnvName, fromTenantEnv string, pluginList []string) *util.APIHandleError

TransPlugins TransPlugins

func (*TenantEnvAction) UpdateTenantEnv added in v1.1.0

func (t *TenantEnvAction) UpdateTenantEnv(tenantEnv *dbmodel.TenantEnvs) error

UpdateTenantEnv update tenant env info

type TenantEnvHandler added in v1.1.0

type TenantEnvHandler interface {
	GetAllTenantEnvs(query string) ([]*dbmodel.TenantEnvs, error)
	GetTenantEnvs(tenantName, query string) ([]*dbmodel.TenantEnvs, error)
	GetTenantEnvsByName(tenantName, tenantEnvName string) (*dbmodel.TenantEnvs, error)
	GetTenantEnvsByUUID(uuid string) (*dbmodel.TenantEnvs, error)
	GetTenantEnvsName(tenantName string) ([]string, error)
	StatsMemCPU(services []*dbmodel.TenantEnvServices) (*api_model.StatsInfo, error)
	TotalMemCPU(services []*dbmodel.TenantEnvServices) (*api_model.StatsInfo, error)
	GetTenantEnvsResources(ctx context.Context, tr *api_model.TenantEnvResources) (map[string]map[string]interface{}, error)
	GetTenantEnvResource(tenantEnvID string) (TenantEnvResourceStats, error)
	GetAllocatableResources(ctx context.Context) (*ClusterResourceStats, error)
	GetServicesResources(tr *api_model.ServicesResources) (map[string]map[string]interface{}, error)
	TenantEnvsSum(tenantName string) (int, error)
	GetProtocols() ([]*dbmodel.RegionProcotols, *util.APIHandleError)
	TransPlugins(tenantEnvID, tenantEnvName, fromTenantEnv string, pluginList []string) *util.APIHandleError
	GetServicesStatus(ids string) map[string]string
	IsClosedStatus(status string) bool
	BindTenantEnvsResource(source []*dbmodel.TenantEnvs) api_model.TenantEnvList
	UpdateTenantEnv(*dbmodel.TenantEnvs) error
	DeleteTenantEnv(ctx context.Context, tenantEnvID string) error
	GetClusterResource(ctx context.Context) *ClusterResourceStats
	CheckResourceName(ctx context.Context, namespace string, req *api_model.CheckResourceNameReq) (*api_model.CheckResourceNameResp, error)
	GetKubeConfig(namespace string) (string, error)
	GetKubeResources(namespace, tenantEnvID string, customSetting api_model.KubeResourceCustomSetting) (string, error)
}

TenantEnvHandler tenant env handler

func GetTenantEnvManager added in v1.1.0

func GetTenantEnvManager() TenantEnvHandler

GetTenantEnvManager get manager

type TenantEnvResourceStats added in v1.1.0

type TenantEnvResourceStats struct {
	TenantEnvID      string `json:"tenant_env_id,omitempty"`
	CPURequest       int64  `json:"cpu_request,omitempty"`
	CPULimit         int64  `json:"cpu_limit,omitempty"`
	MemoryRequest    int64  `json:"memory_request,omitempty"`
	MemoryLimit      int64  `json:"memory_limit,omitempty"`
	RunningAppNum    int64  `json:"running_app_num"`
	UnscdCPUReq      int64  `json:"unscd_cpu_req,omitempty"`
	UnscdCPULimit    int64  `json:"unscd_cpu_limit,omitempty"`
	UnscdMemoryReq   int64  `json:"unscd_memory_req,omitempty"`
	UnscdMemoryLimit int64  `json:"unscd_memory_limit,omitempty"`
}

TenantEnvResourceStats tenant env resource stats

type ThirdPartyServiceHanlder

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

ThirdPartyServiceHanlder handles business logic for all third-party services

func Create3rdPartySvcHandler

func Create3rdPartySvcHandler(dbmanager db.Manager, statusCli *client.AppRuntimeSyncClient) *ThirdPartyServiceHanlder

Create3rdPartySvcHandler creates a new *ThirdPartyServiceHanlder.

func Get3rdPartySvcHandler

func Get3rdPartySvcHandler() *ThirdPartyServiceHanlder

Get3rdPartySvcHandler returns the defalut ThirdParthServiceHanlder

func (*ThirdPartyServiceHanlder) AddEndpoints

func (t *ThirdPartyServiceHanlder) AddEndpoints(sid string, d *model.AddEndpiontsReq) error

AddEndpoints adds endpoints for third-party service.

func (*ThirdPartyServiceHanlder) DelEndpoints

func (t *ThirdPartyServiceHanlder) DelEndpoints(epid, sid string) error

DelEndpoints deletes endpoints for third-party service.

func (*ThirdPartyServiceHanlder) ListEndpoints

func (t *ThirdPartyServiceHanlder) ListEndpoints(componentID string) ([]*model.ThirdEndpoint, error)

ListEndpoints lists third-party service endpoints.

func (*ThirdPartyServiceHanlder) UpdEndpoints

UpdEndpoints updates endpoints for third-party service.

type VersionInfo

type VersionInfo struct {
	Version []*LangInfo `json:"version"`
}

VersionInfo VersionInfo

type VolumeTypeAction

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

VolumeTypeAction action

func CreateVolumeTypeManger

func CreateVolumeTypeManger(statusCli *client.AppRuntimeSyncClient) *VolumeTypeAction

CreateVolumeTypeManger create VolumeType manager

func (*VolumeTypeAction) DeleteVolumeType

func (vta *VolumeTypeAction) DeleteVolumeType(volumeType string) error

DeleteVolumeType delte volume type

func (*VolumeTypeAction) GetAllStorageClasses

func (vta *VolumeTypeAction) GetAllStorageClasses() ([]*pb.StorageClassDetail, error)

GetAllStorageClasses get all storage class

func (*VolumeTypeAction) GetAllVolumeTypes

func (vta *VolumeTypeAction) GetAllVolumeTypes() ([]*api_model.VolumeTypeStruct, error)

GetAllVolumeTypes get all volume types

func (*VolumeTypeAction) GetAllVolumeTypesByPage

func (vta *VolumeTypeAction) GetAllVolumeTypesByPage(page int, pageSize int) ([]*api_model.VolumeTypeStruct, error)

GetAllVolumeTypesByPage get all volume types by page

func (*VolumeTypeAction) GetVolumeTypeByType

func (vta *VolumeTypeAction) GetVolumeTypeByType(volumtType string) (*dbmodel.TenantEnvServiceVolumeType, error)

GetVolumeTypeByType get volume type by type

func (*VolumeTypeAction) SetVolumeType

func (vta *VolumeTypeAction) SetVolumeType(vol *api_model.VolumeTypeStruct) error

SetVolumeType set volume type

func (*VolumeTypeAction) UpdateVolumeType

func (vta *VolumeTypeAction) UpdateVolumeType(dbVolume *dbmodel.TenantEnvServiceVolumeType, vol *api_model.VolumeTypeStruct) error

UpdateVolumeType update volume type

func (*VolumeTypeAction) VolumeTypeAction

func (vta *VolumeTypeAction) VolumeTypeAction(action, volumeTypeID string) error

VolumeTypeAction open volme type or close it

func (*VolumeTypeAction) VolumeTypeVar

func (vta *VolumeTypeAction) VolumeTypeVar(action string, vtm *dbmodel.TenantEnvServiceVolumeType) error

VolumeTypeVar volume type crud

type VolumeTypeHandler

type VolumeTypeHandler interface {
	VolumeTypeVar(action string, vtm *dbmodel.TenantEnvServiceVolumeType) error
	GetAllVolumeTypes() ([]*api_model.VolumeTypeStruct, error)
	GetAllVolumeTypesByPage(page int, pageSize int) ([]*api_model.VolumeTypeStruct, error)
	GetVolumeTypeByType(volumeType string) (*dbmodel.TenantEnvServiceVolumeType, error)
	GetAllStorageClasses() ([]*pb.StorageClassDetail, error)
	VolumeTypeAction(action, volumeTypeID string) error
	DeleteVolumeType(volumeTypeID string) error
	SetVolumeType(vtm *api_model.VolumeTypeStruct) error
	UpdateVolumeType(dbVolume *dbmodel.TenantEnvServiceVolumeType, vol *api_model.VolumeTypeStruct) error
}

VolumeTypeHandler LicenseAction

func GetVolumeTypeHandler

func GetVolumeTypeHandler() VolumeTypeHandler

GetVolumeTypeHandler get volumeType handler

Directories

Path Synopsis
app_governance_mode

Jump to

Keyboard shortcuts

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