runtime

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRuntimeService

func NewRuntimeService(options ...ServiceOption) pb.RuntimeServiceServer

Types

type BundleService

type BundleService interface {
	CheckPermission(req *apistructs.PermissionCheckRequest) (*apistructs.PermissionCheckResponseData, error)
	GetCluster(name string) (*apistructs.ClusterInfo, error)
	InspectServiceGroupWithTimeout(namespace string, name string) (*apistructs.ServiceGroup, error)
	GetApp(id uint64) (*apistructs.ApplicationDTO, error)
}

func NewBundleService

func NewBundleService() BundleService

type DBService

type DBService interface {
	GetRuntimeAllowNil(id uint64) (*dbclient.Runtime, error)
	FindRuntime(id spec.RuntimeUniqueId) (*dbclient.Runtime, error)
	FindLastDeployment(id uint64) (*dbclient.Deployment, error)
	FindDomainsByRuntimeId(id uint64) ([]dbclient.RuntimeDomain, error)
	GetRuntimeHPARulesByRuntimeId(runtimeID uint64) ([]dbclient.RuntimeHPA, error)
	GetRuntimeVPARulesByRuntimeId(runtimeID uint64) ([]dbclient.RuntimeVPA, error)
	GetRuntime(id uint64) (*dbclient.Runtime, error)
	UpdateRuntime(runtime *dbclient.Runtime) error
}

func NewDBService

func NewDBService(orm *gorm.DB) DBService

type EventManagerService

type EventManagerService interface {
	EmitEvent(e *events.RuntimeEvent)
}

type Service

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

Service implements pb.RuntimeServiceServer

func (*Service) CheckRuntimeExist

func (r *Service) CheckRuntimeExist(ctx context.Context, req *pb.CheckRuntimeExistReq) (*pb.CheckRuntimeExistResp, error)

func (*Service) DelRuntime

func (r *Service) DelRuntime(ctx context.Context, req *pb.DelRuntimeRequest) (*pb.Runtime, error)

func (*Service) Delete

func (r *Service) Delete(operator user.ID, orgID uint64, runtimeID uint64) (*pb.Runtime, error)

Delete turn status of runtime to be Deleting

func (*Service) GetRuntime

func (r *Service) GetRuntime(ctx context.Context, request *pb.GetRuntimeRequest) (*pb.RuntimeInspect, error)

GetRuntime Get detail information of a single runtime

func (*Service) Healthz

func (r *Service) Healthz(ctx context.Context, req *cpb.VoidRequest) (*cpb.VoidResponse, error)

type ServiceOption

type ServiceOption func(*Service) *Service

func WithBundleService

func WithBundleService(s BundleService) ServiceOption

func WithClusterSvc

func WithClusterSvc(clusterSvc clusterpb.ClusterServiceServer) ServiceOption

func WithDBService

func WithDBService(db DBService) ServiceOption

func WithEventManagerService

func WithEventManagerService(evMgr EventManagerService) ServiceOption

func WithServiceGroupImpl

func WithServiceGroupImpl(serviceGroupImpl servicegroup.ServiceGroup) ServiceOption

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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