Documentation ¶
Index ¶
- Variables
- type ClusterService
- func (c *ClusterService) Create(req *pb.CreateClusterRequest) error
- func (c *ClusterService) CreateCluster(ctx context.Context, req *pb.CreateClusterRequest) (*pb.CreateClusterResponse, error)
- func (c *ClusterService) CreateWithEvent(req *pb.CreateClusterRequest) error
- func (c *ClusterService) DeleteByName(clusterName string) error
- func (c *ClusterService) DeleteCluster(ctx context.Context, req *pb.DeleteClusterRequest) (*pb.DeleteClusterResponse, error)
- func (c *ClusterService) DeleteWithEvent(clusterName string) error
- func (c *ClusterService) Get(idOrName string) (*pb.ClusterInfo, error)
- func (c *ClusterService) GetCluster(ctx context.Context, req *pb.GetClusterRequest) (*pb.GetClusterResponse, error)
- func (c *ClusterService) List() ([]*pb.ClusterInfo, error)
- func (c *ClusterService) ListCluster(ctx context.Context, req *pb.ListClusterRequest) (*pb.ListClusterResponse, error)
- func (c *ClusterService) ListClusterByType(clusterType string) ([]*pb.ClusterInfo, error)
- func (c *ClusterService) PatchCluster(ctx context.Context, req *pb.PatchClusterRequest) (*pb.PatchClusterResponse, error)
- func (c *ClusterService) PatchWithEvent(req *pb.PatchClusterRequest) error
- func (c *ClusterService) Update(req *pb.UpdateClusterRequest) error
- func (c *ClusterService) UpdateCluster(ctx context.Context, req *pb.UpdateClusterRequest) (*pb.UpdateClusterResponse, error)
- func (c *ClusterService) UpdateWithEvent(req *pb.UpdateClusterRequest) error
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPreCheckCluster = err("ErrPreCheckCluster", "auth failed") ErrCreateCluster = err("ErrCreateCluster", "failed to create cluster") ErrUpdateCluster = err("ErrUpdateCluster", "failed to update cluster") ErrPatchCluster = err("ErrPatchCluster", "failed to patch cluster") ErrGetCluster = err("ErrGetCluster", "failed to get cluster") ErrListCluster = err("ErrListCluster", "failed to list cluster") ErrDeleteCluster = err("ErrDeleteCluster", "failed to delete cluster") ErrGetClusterInfo = err("ErrGetClusterInfo", "failed to get cluster info") )
Functions ¶
This section is empty.
Types ¶
type ClusterService ¶
type ClusterService struct {
// contains filtered or unexported fields
}
func NewClusterService ¶
func NewClusterService(options ...Option) *ClusterService
func (*ClusterService) Create ¶
func (c *ClusterService) Create(req *pb.CreateClusterRequest) error
Create creates cluster
func (*ClusterService) CreateCluster ¶
func (c *ClusterService) CreateCluster(ctx context.Context, req *pb.CreateClusterRequest) (*pb.CreateClusterResponse, error)
func (*ClusterService) CreateWithEvent ¶
func (c *ClusterService) CreateWithEvent(req *pb.CreateClusterRequest) error
CreateWithEvent create cluster with event request
func (*ClusterService) DeleteByName ¶
func (c *ClusterService) DeleteByName(clusterName string) error
DeleteByName delete cluster by name
func (*ClusterService) DeleteCluster ¶
func (c *ClusterService) DeleteCluster(ctx context.Context, req *pb.DeleteClusterRequest) (*pb.DeleteClusterResponse, error)
func (*ClusterService) DeleteWithEvent ¶
func (c *ClusterService) DeleteWithEvent(clusterName string) error
DeleteWithEvent delete cluster with delete event
func (*ClusterService) Get ¶
func (c *ClusterService) Get(idOrName string) (*pb.ClusterInfo, error)
Get gets *apistructs.ClusterInfo by name
func (*ClusterService) GetCluster ¶
func (c *ClusterService) GetCluster(ctx context.Context, req *pb.GetClusterRequest) (*pb.GetClusterResponse, error)
func (*ClusterService) List ¶
func (c *ClusterService) List() ([]*pb.ClusterInfo, error)
List lists all cluster
func (*ClusterService) ListCluster ¶
func (c *ClusterService) ListCluster(ctx context.Context, req *pb.ListClusterRequest) (*pb.ListClusterResponse, error)
func (*ClusterService) ListClusterByType ¶
func (c *ClusterService) ListClusterByType(clusterType string) ([]*pb.ClusterInfo, error)
func (*ClusterService) PatchCluster ¶
func (c *ClusterService) PatchCluster(ctx context.Context, req *pb.PatchClusterRequest) (*pb.PatchClusterResponse, error)
func (*ClusterService) PatchWithEvent ¶
func (c *ClusterService) PatchWithEvent(req *pb.PatchClusterRequest) error
PatchWithEvent patch with event
func (*ClusterService) Update ¶
func (c *ClusterService) Update(req *pb.UpdateClusterRequest) error
Update update cluster
func (*ClusterService) UpdateCluster ¶
func (c *ClusterService) UpdateCluster(ctx context.Context, req *pb.UpdateClusterRequest) (*pb.UpdateClusterResponse, error)
func (*ClusterService) UpdateWithEvent ¶
func (c *ClusterService) UpdateWithEvent(req *pb.UpdateClusterRequest) error
UpdateWithEvent update cluster & sender cluster update event
Click to show internal directories.
Click to hide internal directories.