Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidArgument = errors.New("invalid argument") ErrStorageClassNotFound = errors.New("没有找到相关存储类") ErrStorageClassIsExists = errors.New("存储类已经存在") ErrStorageClassTemplateNotExists = errors.New("存储类模版不存在") ErrStorageClassTemplateEncode = errors.New("存储类模版处理失败") ErrStorageClassK8sCreate = errors.New("存储类创建失败") ErrStorageClassList = errors.New("存储类列表获取失败") ErrStorageClassK8sGet = errors.New("存储类获取失败") )
Functions ¶
Types ¶
type Service ¶
type Service interface {
// 同步storageclass
Sync(_ context.Context) (err error)
// 根据ns获取 storageclass
Get(ctx context.Context, name string) (rs interface{}, err error)
// 创建storageclass
Post(ctx context.Context, name, provisioner, reclaimRolicy, volumeBindingMode string) (err error)
// 删除存储类
Delete(ctx context.Context, name string) (err error)
// 存储类列表
List(ctx context.Context, offset, limit int) (res []*types.StorageClass, err error)
}
func NewService ¶
func NewService(logger log.Logger, client kubernetes.K8sClient, repository repository.Repository) Service
Click to show internal directories.
Click to hide internal directories.