Documentation ¶
Index ¶
- Variables
- func ConvertLocalPathToRemote(diskName, localPath string) (string, error)
- func CopyObject(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, ...) error
- func DeleteFile(ctx context.Context, diskName, remotePath string) error
- func DeleteFileWithContent(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, ...) error
- func GetFileReader(ctx context.Context, diskName, remotePath string) (io.ReadCloser, error)
- func GetFileSize(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, ...) (int64, error)
- func InitCredentialsAndConnections(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, ...) error
- func PutFile(ctx context.Context, diskName, remotePath string, content []byte) error
- func ReadBoolText(scanner *bufio.Scanner) (bool, error)
- func ReadFileContent(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, ...) ([]byte, error)
- func ReadInt64Text(scanner *bufio.Scanner) (int64, error)
- func ReadIntText(scanner *bufio.Scanner) (int, error)
- func WriteFileContent(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, ...) error
- func WriteMetadataToFile(metadata *Metadata, path string) error
- type Metadata
- type MetadataVersion
- type Object
- type ObjectStorageConnection
- type ObjectStorageCredentials
- type StorageObject
Constants ¶
This section is empty.
Variables ¶
View Source
var DisksConnections map[string]ObjectStorageConnection
View Source
var DisksCredentials map[string]ObjectStorageCredentials
View Source
var SystemDisks map[string]clickhouse.Disk
Functions ¶
func CopyObject ¶
func CopyObject(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, diskName, srcBucket, srcKey, dstPath string) error
func DeleteFileWithContent ¶
func DeleteFileWithContent(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, diskName, localPath string) error
func GetFileReader ¶
func GetFileSize ¶
func GetFileSize(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, diskName, remotePath string) (int64, error)
func InitCredentialsAndConnections ¶
func InitCredentialsAndConnections(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, diskName string) error
func ReadFileContent ¶
func ReadFileContent(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, diskName, localPath string) ([]byte, error)
func WriteFileContent ¶
func WriteFileContent(ctx context.Context, ch *clickhouse.ClickHouse, cfg *config.Config, diskName, localPath string, content []byte) error
func WriteMetadataToFile ¶
Types ¶
type Metadata ¶
type Metadata struct { Version MetadataVersion StorageObjectCount int TotalSize int64 StorageObjects []StorageObject RefCount int ReadOnly bool InlineData string Path string }
func ReadMetadataFromFile ¶
func ReadMetadataFromReader ¶
func ReadMetadataFromReader(metadataFile io.ReadCloser, path string) (*Metadata, error)
type MetadataVersion ¶
type MetadataVersion uint32
const ( VersionAbsolutePaths MetadataVersion = 1 VersionRelativePath MetadataVersion = 2 VersionReadOnlyFlag MetadataVersion = 3 VersionInlineData MetadataVersion = 4 )
type ObjectStorageConnection ¶
type ObjectStorageConnection struct { Type string S3 *storage.S3 AzureBlob *storage.AzureBlob MetadataPath string }
func (*ObjectStorageConnection) GetRemoteBucket ¶
func (c *ObjectStorageConnection) GetRemoteBucket() string
func (*ObjectStorageConnection) GetRemotePath ¶
func (c *ObjectStorageConnection) GetRemotePath() string
func (*ObjectStorageConnection) GetRemoteStorage ¶
func (c *ObjectStorageConnection) GetRemoteStorage() storage.RemoteStorage
type StorageObject ¶
Click to show internal directories.
Click to hide internal directories.