cluster

package
v0.0.0-...-f22f8d3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToPbCluster

func ConvertToPbCluster(cluster model.Cluster) *pb.Cluster

Types

type ClusterAccessor

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

Accessor accesses cluster info in DB.

func New

func New(db *gorm.DB) *ClusterAccessor

NewClusterAccessor returns new Accessor to access clusters.

func (*ClusterAccessor) CreateClusterInfo

func (x *ClusterAccessor) CreateClusterInfo(contractId string, cspId uuid.UUID, name string, conf *pb.ClusterConf, creator uuid.UUID, description string) (string, error)

Create creates new cluster with contract ID, csp ID, name.

func (*ClusterAccessor) GetCluster

func (x *ClusterAccessor) GetCluster(id string) (*pb.Cluster, error)

Get returns a Cluster if it exists.

func (*ClusterAccessor) GetClustersByContractID

func (x *ClusterAccessor) GetClustersByContractID(contractId string) ([]*pb.Cluster, error)

GetClusterIDsByContractID returns a list of clusters by ContractID if it exists.

func (*ClusterAccessor) GetClustersByCspID

func (x *ClusterAccessor) GetClustersByCspID(cspId uuid.UUID) ([]*pb.Cluster, error)

GetClusterIDsByCspID returns a list of clusters by CspID if it exists.

func (*ClusterAccessor) UpdateStatus

func (x *ClusterAccessor) UpdateStatus(id string, status pb.ClusterStatus, statusDesc string, workflowId string) error

UpdateStatus updates an status of cluster for Cluster.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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