Documentation ¶
Index ¶
- Constants
- Variables
- func FormatLocation(loc *remote_pb.RemoteStorageLocation) string
- func GetAllRemoteStorageNames() string
- func GetRemoteStorageNamesHasBucket() string
- func GetSyncOffset(grpcDialOption grpc.DialOption, filer pb.ServerAddress, dir string) (lastOffsetTsNs int64, readErr error)
- func ParseLocationName(remote string) (locationName string)
- func ParseRemoteLocation(remoteConfType string, remote string) (remoteStorageLocation *remote_pb.RemoteStorageLocation, err error)
- func SetSyncOffset(grpcDialOption grpc.DialOption, filer pb.ServerAddress, dir string, ...) error
- func TraverseBfs(listDirFn ListDirectoryFunc, parentPath util.FullPath, visitFn VisitFunc) (err error)
- type Bucket
- type CachedRemoteStorageClient
- type ListDirectoryFunc
- type RemoteStorageClient
- type RemoteStorageClientMaker
- type VisitFunc
Constants ¶
View Source
const (
SyncKeyPrefix = "remote.sync."
)
Variables ¶
View Source
var (
RemoteStorageClientMakers = make(map[string]RemoteStorageClientMaker)
)
Functions ¶
func FormatLocation ¶
func FormatLocation(loc *remote_pb.RemoteStorageLocation) string
func GetAllRemoteStorageNames ¶
func GetAllRemoteStorageNames() string
func GetRemoteStorageNamesHasBucket ¶
func GetRemoteStorageNamesHasBucket() string
func GetSyncOffset ¶
func GetSyncOffset(grpcDialOption grpc.DialOption, filer pb.ServerAddress, dir string) (lastOffsetTsNs int64, readErr error)
func ParseLocationName ¶
func ParseRemoteLocation ¶
func ParseRemoteLocation(remoteConfType string, remote string) (remoteStorageLocation *remote_pb.RemoteStorageLocation, err error)
func SetSyncOffset ¶
func SetSyncOffset(grpcDialOption grpc.DialOption, filer pb.ServerAddress, dir string, offsetTsNs int64) error
func TraverseBfs ¶
func TraverseBfs(listDirFn ListDirectoryFunc, parentPath util.FullPath, visitFn VisitFunc) (err error)
Types ¶
type CachedRemoteStorageClient ¶
type CachedRemoteStorageClient struct { *remote_pb.RemoteConf RemoteStorageClient }
type ListDirectoryFunc ¶
type RemoteStorageClient ¶
type RemoteStorageClient interface { Traverse(loc *remote_pb.RemoteStorageLocation, visitFn VisitFunc) error ReadFile(loc *remote_pb.RemoteStorageLocation, offset int64, size int64) (data []byte, err error) WriteDirectory(loc *remote_pb.RemoteStorageLocation, entry *filer_pb.Entry) (err error) RemoveDirectory(loc *remote_pb.RemoteStorageLocation) (err error) WriteFile(loc *remote_pb.RemoteStorageLocation, entry *filer_pb.Entry, reader io.Reader) (remoteEntry *filer_pb.RemoteEntry, err error) UpdateFileMetadata(loc *remote_pb.RemoteStorageLocation, oldEntry *filer_pb.Entry, newEntry *filer_pb.Entry) (err error) DeleteFile(loc *remote_pb.RemoteStorageLocation) (err error) ListBuckets() ([]*Bucket, error) CreateBucket(name string) (err error) DeleteBucket(name string) (err error) }
func GetRemoteStorage ¶
func GetRemoteStorage(remoteConf *remote_pb.RemoteConf) (RemoteStorageClient, error)
type RemoteStorageClientMaker ¶
type RemoteStorageClientMaker interface { Make(remoteConf *remote_pb.RemoteConf) (RemoteStorageClient, error) HasBucket() bool }
Click to show internal directories.
Click to hide internal directories.