interfaces

package
v0.0.0-...-005948e Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is interface providers.

Functions

This section is empty.

Types

type AppInterface

type AppInterface struct {
	v1alpha1.UnimplementedAppInterfaceServer
	// contains filtered or unexported fields
}

func NewAppInterface

func NewAppInterface(uc *biz.AppUsecase, user *biz.UserUseCase, logger log.Logger) *AppInterface

func (*AppInterface) AppReleaseList

func (a *AppInterface) AppReleaseList(ctx context.Context, appReleaseReq *v1alpha1.AppReleaseReq) (*v1alpha1.AppReleaseList, error)

func (*AppInterface) CreateAppType

func (a *AppInterface) CreateAppType(ctx context.Context, appType *v1alpha1.AppType) (*common.Msg, error)

func (*AppInterface) Delete

func (a *AppInterface) Delete(ctx context.Context, appReq *v1alpha1.AppReq) (*common.Msg, error)

func (*AppInterface) DeleteAppRelease

func (a *AppInterface) DeleteAppRelease(ctx context.Context, appReleaseReq *v1alpha1.AppReleaseReq) (*common.Msg, error)

func (*AppInterface) DeleteAppType

func (a *AppInterface) DeleteAppType(ctx context.Context, appTypeReq *v1alpha1.AppTypeReq) (*common.Msg, error)

func (*AppInterface) DeleteAppVersion

func (a *AppInterface) DeleteAppVersion(ctx context.Context, appReq *v1alpha1.AppReq) (*common.Msg, error)

func (*AppInterface) DeleteRepo

func (a *AppInterface) DeleteRepo(ctx context.Context, repoReq *v1alpha1.AppRepoReq) (*common.Msg, error)

func (*AppInterface) Get

func (a *AppInterface) Get(ctx context.Context, appReq *v1alpha1.AppReq) (*v1alpha1.App, error)

func (*AppInterface) GetAppDetailByRepo

func (a *AppInterface) GetAppDetailByRepo(ctx context.Context, repoReq *v1alpha1.AppRepoReq) (*v1alpha1.App, error)

func (*AppInterface) GetAppRelease

func (a *AppInterface) GetAppRelease(ctx context.Context, AppReleaseReq *v1alpha1.AppReleaseReq) (*v1alpha1.AppRelease, error)

func (*AppInterface) GetAppReleaseResources

func (a *AppInterface) GetAppReleaseResources(ctx context.Context, appReleaseReq *v1alpha1.AppReleaseReq) (*v1alpha1.AppReleasepResources, error)

func (*AppInterface) GetAppsByRepo

func (a *AppInterface) GetAppsByRepo(ctx context.Context, repoReq *v1alpha1.AppRepoReq) (*v1alpha1.AppList, error)

func (*AppInterface) List

func (a *AppInterface) List(ctx context.Context, appReq *v1alpha1.AppReq) (*v1alpha1.AppList, error)

func (*AppInterface) ListAppType

func (a *AppInterface) ListAppType(ctx context.Context, _ *emptypb.Empty) (*v1alpha1.AppTypeList, error)

func (*AppInterface) ListRepo

func (*AppInterface) Ping

func (a *AppInterface) Ping(ctx context.Context, _ *emptypb.Empty) (*common.Msg, error)

func (*AppInterface) Save

func (a *AppInterface) Save(ctx context.Context, app *v1alpha1.App) (*common.Msg, error)

func (*AppInterface) SaveAppRelease

func (a *AppInterface) SaveAppRelease(ctx context.Context, appReleaseReq *v1alpha1.AppReleaseReq) (*v1alpha1.AppRelease, error)

func (*AppInterface) SaveRepo

func (a *AppInterface) SaveRepo(ctx context.Context, repo *v1alpha1.AppRepo) (*common.Msg, error)

func (*AppInterface) UploadApp

type Autoscaler

type Autoscaler struct {
	autoscaler.UnimplementedCloudProviderServer
	// contains filtered or unexported fields
}

func NewAutoscaler

func NewAutoscaler(clusterUc *biz.ClusterUsecase, c *conf.Bootstrap, logger log.Logger) *Autoscaler

func (*Autoscaler) Cleanup

Cleanup:在云提供商销毁前清理打开的资源,例如协程等。 Cleanup cleans up open resources before the cloud provider is destroyed, i.e. go routines etc.

func (*Autoscaler) GPULabel

GPULabel:返回添加到具有 GPU 资源的节点的标签。 GPULabel returns the label added to nodes with GPU resource.

func (*Autoscaler) GetAvailableGPUTypes

GetAvailableGPUTypes:返回云提供商支持的所有 GPU 类型。 GetAvailableGPUTypes return all available GPU types cloud provider supports.

func (*Autoscaler) NodeGroupDecreaseTargetSize

NodeGroupDecreaseTargetSize:减少节点组的目标大小。 NodeGroupDecreaseTargetSize decreases the target size of the node group. This function doesn't permit to delete any existing node and can be used only to reduce the request for new nodes that have not been yet fulfilled. Delta should be negative. It is assumed that cloud provider will not delete the existing nodes if the size when there is an option to just decrease the target.

func (*Autoscaler) NodeGroupDeleteNodes

NodeGroupDeleteNodes:从节点组中删除节点,同时减少节点组的大小。 NodeGroupDeleteNodes deletes nodes from this node group (and also decreasing the size of the node group with that). Error is returned either on failure or if the given node doesn't belong to this node group. This function should wait until node group size is updated.

func (*Autoscaler) NodeGroupForNode

NodeGroupForNode:返回给定节点所属的节点组。 NodeGroupForNode returns the node group for the given node. The node group id is an empty string if the node should not be processed by cluster autoscaler.

func (*Autoscaler) NodeGroupGetOptions

NodeGroupGetOptions:返回该节点组应使用的自动扩展选项。 GetOptions returns NodeGroupAutoscalingOptions that should be used for this particular NodeGroup. Implementation optional: if unimplemented return error code 12 (for `Unimplemented`)

func (*Autoscaler) NodeGroupIncreaseSize

NodeGroupIncreaseSize:增加节点组的大小。 NodeGroupIncreaseSize increases the size of the node group. To delete a node you need to explicitly name it and use NodeGroupDeleteNodes. This function should wait until node group size is updated.

func (*Autoscaler) NodeGroupNodes

NodeGroupNodes:返回属于该节点组的所有节点列表。 NodeGroupNodes returns a list of all nodes that belong to this node group.

func (*Autoscaler) NodeGroupTargetSize

NodeGroupTargetSize:返回节点组的当前目标大小。 NodeGroupTargetSize returns the current target size of the node group. It is possible that the number of nodes in Kubernetes is different at the moment but should be equal to the size of a node group once everything stabilizes (new nodes finish startup and registration or removed nodes are deleted completely).

func (*Autoscaler) NodeGroupTemplateNodeInfo

NodeGroupTemplateNodeInfo:返回一个空节点的结构,用于扩展模拟。 NodeGroupTemplateNodeInfo returns a structure of an empty (as if just started) node, with all of the labels, capacity and allocatable information. This will be used in scale-up simulations to predict what would a new node look like if a node group was expanded. Implementation optional: if unimplemented return error code 12 (for `Unimplemented`)

func (*Autoscaler) NodeGroups

NodeGroups:返回配置的所有节点组。 NodeGroups returns all node groups configured for this cloud provider.

func (*Autoscaler) PricingNodePrice

PricingNodePrice:返回在指定时间段内运行一个节点的理论最低价格。 PricingNodePrice returns a theoretical minimum price of running a node for a given period of time on a perfectly matching machine. Implementation optional: if unimplemented return error code 12 (for `Unimplemented`)

func (*Autoscaler) PricingPodPrice

PricingPodPrice:返回在指定时间段内运行一个 Pod 的理论最低价格。 PricingPodPrice returns a theoretical minimum price of running a pod for a given period of time on a perfectly matching machine. Implementation optional: if unimplemented return error code 12 (for `Unimplemented`)

func (*Autoscaler) Refresh

Refresh:在每个主循环前调用,用于动态更新云提供商状态。 Refresh is called before every main loop and can be used to dynamically update cloud provider state.

type ClusterInterface

type ClusterInterface struct {
	v1alpha1.UnimplementedClusterInterfaceServer
	// contains filtered or unexported fields
}

func NewClusterInterface

func NewClusterInterface(clusterUc *biz.ClusterUsecase, c *conf.Bootstrap, logger log.Logger) *ClusterInterface

func (*ClusterInterface) Delete

func (c *ClusterInterface) Delete(ctx context.Context, clusterID *v1alpha1.ClusterIdMessge) (*common.Msg, error)

func (*ClusterInterface) Get

func (*ClusterInterface) GetCluster

func (c *ClusterInterface) GetCluster(ctx context.Context, clusterId int64) (*biz.Cluster, error)

func (*ClusterInterface) GetClusterLevels

func (c *ClusterInterface) GetClusterLevels(ctx context.Context, _ *emptypb.Empty) (*v1alpha1.ClusterLevels, error)

func (*ClusterInterface) GetClusterProviders

func (c *ClusterInterface) GetClusterProviders(ctx context.Context, _ *emptypb.Empty) (*v1alpha1.ClusterProviders, error)

func (*ClusterInterface) GetClusterStatuses

func (c *ClusterInterface) GetClusterStatuses(ctx context.Context, _ *emptypb.Empty) (*v1alpha1.ClusterStatuses, error)

func (*ClusterInterface) GetNodeGroupTypes

func (c *ClusterInterface) GetNodeGroupTypes(ctx context.Context, _ *emptypb.Empty) (*v1alpha1.NodeGroupTypes, error)

func (*ClusterInterface) GetNodeRoles

func (c *ClusterInterface) GetNodeRoles(ctx context.Context, _ *emptypb.Empty) (*v1alpha1.NodeRoles, error)

func (*ClusterInterface) GetNodeStatuses

func (c *ClusterInterface) GetNodeStatuses(ctx context.Context, _ *emptypb.Empty) (*v1alpha1.NodeStatuses, error)

func (*ClusterInterface) GetRegions

func (c *ClusterInterface) GetRegions(ctx context.Context, clusterArgs *v1alpha1.ClusterRegionArgs) (*v1alpha1.Regions, error)

get regions

func (*ClusterInterface) GetResourceTypes

func (c *ClusterInterface) GetResourceTypes(ctx context.Context, _ *emptypb.Empty) (*v1alpha1.ResourceTypes, error)

func (*ClusterInterface) List

func (*ClusterInterface) Ping

func (*ClusterInterface) Save

func (c *ClusterInterface) Save(ctx context.Context, clusterArgs *v1alpha1.ClusterSaveArgs) (msg *v1alpha1.ClusterIdMessge, err error)

func (*ClusterInterface) Start

func (c *ClusterInterface) Start(ctx context.Context, clusterArgs *v1alpha1.ClusterIdMessge) (*common.Msg, error)

func (*ClusterInterface) Stop

func (c *ClusterInterface) Stop(ctx context.Context, clusterArgs *v1alpha1.ClusterIdMessge) (*common.Msg, error)

type ProjectInterface

type ProjectInterface struct {
	v1alpha1.UnimplementedProjectServiceServer
	// contains filtered or unexported fields
}

func NewProjectInterface

func NewProjectInterface(uc *biz.ProjectUsecase, userUc *biz.UserUseCase, c *conf.Bootstrap, logger log.Logger) *ProjectInterface

func (*ProjectInterface) Delete

func (p *ProjectInterface) Delete(ctx context.Context, projectReq *v1alpha1.ProjectReq) (*common.Msg, error)

func (*ProjectInterface) Get

func (*ProjectInterface) GetProject

func (p *ProjectInterface) GetProject(ctx context.Context, projectId int64) (*biz.Project, error)

func (*ProjectInterface) List

func (*ProjectInterface) Save

func (p *ProjectInterface) Save(ctx context.Context, project *v1alpha1.Project) (*common.Msg, error)

type ServicesInterface

type ServicesInterface struct {
	v1alpha1.UnimplementedServiceInterfaceServer
	// contains filtered or unexported fields
}

func NewServicesInterface

func NewServicesInterface(serviceUc *biz.ServicesUseCase) *ServicesInterface

func (*ServicesInterface) ApplyService

func (s *ServicesInterface) ApplyService(ctx context.Context, serviceReq *v1alpha1.ServiceRequest) (*common.Msg, error)

func (*ServicesInterface) CreateContinuousDeployment

func (s *ServicesInterface) CreateContinuousDeployment(ctx context.Context, cd *v1alpha1.ContinuousDeployment) (*common.Msg, error)

func (*ServicesInterface) CreateContinuousIntegration

func (s *ServicesInterface) CreateContinuousIntegration(ctx context.Context, ci *v1alpha1.ContinuousIntegration) (*common.Msg, error)

func (*ServicesInterface) Delete

func (s *ServicesInterface) Delete(ctx context.Context, serviceReq *v1alpha1.ServiceRequest) (*common.Msg, error)

func (*ServicesInterface) DeleteContinuousDeployment

func (s *ServicesInterface) DeleteContinuousDeployment(ctx context.Context, cdReq *v1alpha1.ContinuousDeploymentRequest) (*common.Msg, error)

func (*ServicesInterface) DeleteContinuousIntegration

func (s *ServicesInterface) DeleteContinuousIntegration(ctx context.Context, ciReq *v1alpha1.ContinuousIntegrationRequest) (*common.Msg, error)

func (*ServicesInterface) Get

func (*ServicesInterface) GetContinuousDeployment

func (*ServicesInterface) GetContinuousDeployments

func (*ServicesInterface) GetContinuousIntegration

func (*ServicesInterface) GetContinuousIntegrations

func (*ServicesInterface) GetServiceResource

func (s *ServicesInterface) GetServiceResource(ctx context.Context, serviceReq *v1alpha1.ServiceRequest) (*v1alpha1.AlreadyResource, error)

func (*ServicesInterface) GetWorkflow

func (*ServicesInterface) List

func (*ServicesInterface) Save

func (s *ServicesInterface) Save(ctx context.Context, service *v1alpha1.Service) (*common.Msg, error)

func (*ServicesInterface) SaveWorkflow

func (s *ServicesInterface) SaveWorkflow(ctx context.Context, wf *v1alpha1.Workflow) (*common.Msg, error)

type UserInterface

type UserInterface struct {
	v1alpha1.UnimplementedUserInterfaceServer
	// contains filtered or unexported fields
}

func NewUserInterface

func NewUserInterface(uc *biz.UserUseCase, conf *conf.Bootstrap) *UserInterface

func (*UserInterface) DeleteUser

func (u *UserInterface) DeleteUser(ctx context.Context, request *v1alpha1.User) (*common.Msg, error)

func (*UserInterface) GetUserInfo

func (u *UserInterface) GetUserInfo(ctx context.Context, _ *emptypb.Empty) (*v1alpha1.User, error)

func (*UserInterface) GetUsers

func (u *UserInterface) GetUsers(ctx context.Context, request *v1alpha1.UsersRequest) (*v1alpha1.Users, error)

func (*UserInterface) SaveUser

func (u *UserInterface) SaveUser(ctx context.Context, request *v1alpha1.User) (*v1alpha1.User, error)

func (*UserInterface) SignIn

func (u *UserInterface) SignIn(ctx context.Context, request *v1alpha1.SignIn) (*v1alpha1.User, error)

type WorkspaceInterface

type WorkspaceInterface struct {
	v1alpha1.UnimplementedWorkspaceInterfaceServer
	// contains filtered or unexported fields
}

func NewWorkspaceInterface

func NewWorkspaceInterface(workspaceUc *biz.WorkspaceUsecase, logger log.Logger) *WorkspaceInterface

func (*WorkspaceInterface) Get

func (*WorkspaceInterface) GetWorkspace

func (w *WorkspaceInterface) GetWorkspace(ctx context.Context, id int64) (*biz.Workspace, error)

func (*WorkspaceInterface) List

func (*WorkspaceInterface) Save

func (w *WorkspaceInterface) Save(ctx context.Context, workspaceParam *v1alpha1.Workspace) (*common.Msg, error)

Jump to

Keyboard shortcuts

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