Documentation ¶
Index ¶
- type Cluster
- func (c *Cluster) Create(ctx context.Context, cluster *kev1alpha.Cluster) (*kev1alpha.Cluster, error)
- func (c *Cluster) Delete(ctx context.Context, name string) error
- func (c *Cluster) Get(ctx context.Context, name string) (*kev1alpha.Cluster, error)
- func (c *Cluster) List(ctx context.Context, pageSize int32, page *v1.Pagination) ([]*kev1alpha.Cluster, *v1.Pagination, error)
- func (c *Cluster) Update(ctx context.Context, cluster *kev1alpha.Cluster, mask *fieldmaskpb.FieldMask) (*kev1alpha.Cluster, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func (*Cluster) Create ¶
func (c *Cluster) Create(ctx context.Context, cluster *kev1alpha.Cluster) (*kev1alpha.Cluster, error)
Create creates a cluster. If the cluster already exists, it returns infra.ErrAlreadyExists.
func (*Cluster) Delete ¶
Delete deletes a cluster by name. If the cluster does not exist, it returns infra.ErrNotFound.
func (*Cluster) Get ¶
Get returns a cluster by name. If the cluster does not exist, it returns infra.ErrNotFound.
func (*Cluster) List ¶
func (c *Cluster) List(ctx context.Context, pageSize int32, page *v1.Pagination) ([]*kev1alpha.Cluster, *v1.Pagination, error)
List returns a list of clusters and next page.
If the page is nil, it returns the first page. If next page does not exist, it returns nil.
func (*Cluster) Update ¶
func (c *Cluster) Update(ctx context.Context, cluster *kev1alpha.Cluster, mask *fieldmaskpb.FieldMask) (*kev1alpha.Cluster, error)
Update updates a cluster.
If the cluster does not exist, it returns infra.ErrNotFound. If the mask is invalid, it returns infra.ErrInvalidArgument.
Click to show internal directories.
Click to hide internal directories.