Documentation ¶
Index ¶
- Constants
- func CreateFileSystemCacheConfig(ctx *logger.RequestContext, req CreateFileSystemCacheRequest) error
- func DeleteFileSystemCacheConfig(ctx *logger.RequestContext, fsID string) error
- func MountPodController(mountPodExpire, interval time.Duration, stopChan chan struct{})
- type CreateFileSystemCacheRequest
- type CreateFileSystemClaimsResponse
- type CreateFileSystemRequest
- type CreateFileSystemResponse
- type CreateLinkRequest
- type DeleteFileSystemRequest
- type DeleteLinkRequest
- type FileSystemCacheResponse
- type FileSystemResponse
- type FileSystemService
- func (s *FileSystemService) CreateFileSystem(ctx *logger.RequestContext, req *CreateFileSystemRequest) (model.FileSystem, error)
- func (s *FileSystemService) DeleteFileSystem(ctx *logger.RequestContext, fsID string) error
- func (s *FileSystemService) GetFileSystem(username, fsName string) (model.FileSystem, error)
- func (s *FileSystemService) HasFsPermission(username, fsID string) (bool, error)
- func (s *FileSystemService) ListFileSystem(ctx *logger.RequestContext, req *ListFileSystemRequest) ([]model.FileSystem, string, error)
- func (s *FileSystemService) SessionToken(username, fsName string) (*GetStsResponse, error)
- type GetFileSystemRequest
- type GetFileSystemResponse
- type GetLinkRequest
- type GetLinkResponse
- type GetSessionRequest
- type GetStsResponse
- type LinkResponse
- type LinkService
- func (s *LinkService) CreateLink(ctx *logger.RequestContext, req *CreateLinkRequest) (model.Link, error)
- func (s *LinkService) DeleteLink(ctx *logger.RequestContext, req *DeleteLinkRequest) error
- func (s *LinkService) FsLock(fsID string) func()
- func (s *LinkService) GetLink(req *GetLinkRequest) ([]model.Link, string, error)
- func (s *LinkService) PersistLinksMeta(fsID string) error
- type ListFileSystemRequest
- type ListFileSystemResponse
Constants ¶
const ( MaxMountPodCpuLimit = "2" MaxMountPodMemLimit = "8Gi" )
const (
TimeFormat = "2006-01-02 15:04:05"
)
Variables ¶
This section is empty.
Functions ¶
func CreateFileSystemCacheConfig ¶
func CreateFileSystemCacheConfig(ctx *logger.RequestContext, req CreateFileSystemCacheRequest) error
func DeleteFileSystemCacheConfig ¶
func DeleteFileSystemCacheConfig(ctx *logger.RequestContext, fsID string) error
func MountPodController ¶ added in v0.14.5
Types ¶
type CreateFileSystemCacheRequest ¶
type CreateFileSystemCacheRequest struct { Username string `json:"username"` FsName string `json:"fsName"` FsID string `json:"-"` CacheDir string `json:"cacheDir"` Quota int `json:"quota"` MetaDriver string `json:"metaDriver"` BlockSize int `json:"blockSize"` Debug bool `json:"debug"` CleanCache bool `json:"cleanCache"` Resource model.ResourceLimit `json:"resource"` NodeTaintToleration map[string]interface{} `json:"nodeTaintToleration"` ExtraConfig map[string]string `json:"extraConfig"` }
type CreateFileSystemClaimsResponse ¶
type CreateFileSystemClaimsResponse struct {
Message string `json:"message"`
}
type CreateFileSystemRequest ¶
type CreateLinkRequest ¶
type DeleteFileSystemRequest ¶
type DeleteLinkRequest ¶
type FileSystemCacheResponse ¶
type FileSystemCacheResponse struct { CacheDir string `json:"cacheDir"` Quota int `json:"quota"` MetaDriver string `json:"metaDriver"` BlockSize int `json:"blockSize"` CleanCache bool `json:"cleanCache"` Resource model.ResourceLimit `json:"resource"` NodeTaintToleration map[string]interface{} `json:"nodeTaintToleration"` ExtraConfig map[string]string `json:"extraConfig"` FsName string `json:"fsName"` Username string `json:"username"` CreateTime string `json:"createTime"` UpdateTime string `json:"updateTime,omitempty"` }
func GetFileSystemCacheConfig ¶
func GetFileSystemCacheConfig(ctx *logger.RequestContext, fsID string) (FileSystemCacheResponse, error)
type FileSystemResponse ¶
type FileSystemResponse struct { Id string `json:"id"` Name string `json:"name"` ServerAddress string `json:"serverAddress"` Type string `json:"type"` SubPath string `json:"subPath"` Username string `json:"username"` Properties map[string]string `json:"properties"` IndependentMountProcess bool `json:"independentMountProcess"` }
type FileSystemService ¶
type FileSystemService struct{}
FileSystemService the service which contains the operation of file system
func GetFileSystemService ¶
func GetFileSystemService() *FileSystemService
GetFileSystemService returns the instance of file system service
func (*FileSystemService) CreateFileSystem ¶
func (s *FileSystemService) CreateFileSystem(ctx *logger.RequestContext, req *CreateFileSystemRequest) (model.FileSystem, error)
CreateFileSystem the function which performs the operation of creating FileSystem
func (*FileSystemService) DeleteFileSystem ¶
func (s *FileSystemService) DeleteFileSystem(ctx *logger.RequestContext, fsID string) error
DeleteFileSystem the function which performs the operation of delete file system
func (*FileSystemService) GetFileSystem ¶
func (s *FileSystemService) GetFileSystem(username, fsName string) (model.FileSystem, error)
GetFileSystem the function which performs the operation of getting file system detail
func (*FileSystemService) HasFsPermission ¶ added in v0.14.3
func (s *FileSystemService) HasFsPermission(username, fsID string) (bool, error)
func (*FileSystemService) ListFileSystem ¶
func (s *FileSystemService) ListFileSystem(ctx *logger.RequestContext, req *ListFileSystemRequest) ([]model.FileSystem, string, error)
ListFileSystem the function which performs the operation of list file systems
func (*FileSystemService) SessionToken ¶ added in v0.14.6
func (s *FileSystemService) SessionToken(username, fsName string) (*GetStsResponse, error)
SessionToken get sts token from bos
type GetFileSystemRequest ¶
type GetFileSystemResponse ¶
type GetLinkRequest ¶
type GetLinkResponse ¶
type GetLinkResponse struct { Marker string `json:"marker"` Truncated bool `json:"truncated"` NextMarker string `json:"nextMarker"` LinkList []*LinkResponse `json:"linkList"` }
type GetSessionRequest ¶ added in v0.14.6
type GetStsResponse ¶ added in v0.14.6
type GetStsResponse struct { AccessKeyId string `json:"accessKey"` SecretAccessKey string `json:"secretKey"` SessionToken string `json:"sessionToken"` CreateTime string `json:"createTime"` Expiration string `json:"expiration"` UserId string `json:"userId"` Bucket string `json:"bucket"` SubPath string `json:"subPath"` Endpoint string `json:"endpoint"` Region string `json:"region"` Duration int `json:"duration"` }
type LinkResponse ¶
type LinkService ¶
type LinkService struct {
// contains filtered or unexported fields
}
LinkService the service which contains the operation of link
func GetLinkService ¶
func GetLinkService() *LinkService
GetLinkService returns the instance of link service
func (*LinkService) CreateLink ¶
func (s *LinkService) CreateLink(ctx *logger.RequestContext, req *CreateLinkRequest) (model.Link, error)
CreateLink the function which performs the operation of creating Link
func (*LinkService) DeleteLink ¶
func (s *LinkService) DeleteLink(ctx *logger.RequestContext, req *DeleteLinkRequest) error
DeleteLink the function which performs the operation of delete file system link
func (*LinkService) GetLink ¶
func (s *LinkService) GetLink(req *GetLinkRequest) ([]model.Link, string, error)
GetLink the function which performs the operation of list file system links
func (*LinkService) PersistLinksMeta ¶
func (s *LinkService) PersistLinksMeta(fsID string) error
type ListFileSystemRequest ¶
type ListFileSystemResponse ¶
type ListFileSystemResponse struct { Marker string `json:"marker"` Truncated bool `json:"truncated"` NextMarker string `json:"nextMarker"` FsList []*FileSystemResponse `json:"fsList"` }