Documentation ¶
Index ¶
- Variables
- func ConvertLocalPathToRemote(diskName, localPath string) (string, error)
- func CopyObject(ctx context.Context, diskName string, srcSize int64, ...) (int64, error)
- func DeleteFile(ctx context.Context, diskName, remotePath string) error
- func GetFileReader(ctx context.Context, diskName, remotePath string) (io.ReadCloser, 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 = xsync.NewMapOf[*ObjectStorageConnection]()
View Source
var DisksCredentials = xsync.NewMapOf[ObjectStorageCredentials]()
View Source
var InitCredentialsAndConnectionsMutex sync.Mutex
View Source
var SystemDisks = xsync.NewMapOf[clickhouse.Disk]()
Functions ¶
func CopyObject ¶
func GetFileReader ¶
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.