Documentation
¶
Index ¶
- type Config
- type ContainerFile
- func (cf ContainerFile) ArchiveFolder(archiveFolder string) string
- func (cf ContainerFile) ArchivePath(archiveFolder string, shardIndex, walIndex, operationIndex int) string
- func (cf ContainerFile) BaseFolder(c Config) string
- func (cf ContainerFile) DataSize() int
- func (cf ContainerFile) Key() string
- func (cf ContainerFile) PathToFile(c Config) string
- func (cf ContainerFile) PathToFileFromFolder(folder string) string
- func (cf ContainerFile) PrefixAndFilename() (prefix string, filename string)
- func (cf ContainerFile) ShardIndex(shardCount uint32) uint32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DeleteInsteadOfArchiving bool
ActiveFolder string
ArchiveFolder string
SqliteFolder string
WalArchiveFolder string
ReplicationActiveFolder string
ReplicationArchiveFolder string
ShardCount int
MaxFileOpen int
WALFolder string
MaxWALFileSize int
MaxWALFileDurationS int
ArchiveCommand string
RsyncCommand string
}
Config config
func InitDefaultConfig ¶
func InitDefaultConfig() *Config
InitDefaultConfig init config with default parameters
func InitDefaultTestConfig ¶
func InitDefaultTestConfig() *Config
InitDefaultTestConfig init config for test
type ContainerFile ¶
ContainerFile container file
func NewContainerFileWTableName ¶
func NewContainerFileWTableName(container string, bucket string, subBucket string, table string) ContainerFile
NewContainerFileWTableName new container file
func ParseContainerFileFromArchivePath ¶ added in v0.0.13
func ParseContainerFileFromArchivePath(b string) (*ContainerFile, error)
ParseContainerFileFromArchivePath parse file path
func ParseContainerFileKey ¶
func ParseContainerFileKey(b string) (*ContainerFile, error)
ParseContainerFileKey parse a container file from string
func (ContainerFile) ArchiveFolder ¶ added in v0.0.13
func (cf ContainerFile) ArchiveFolder(archiveFolder string) string
ArchiveFolder path to the archive file
func (ContainerFile) ArchivePath ¶
func (cf ContainerFile) ArchivePath(archiveFolder string, shardIndex, walIndex, operationIndex int) string
ArchivePath path to the archive folder
func (ContainerFile) BaseFolder ¶
func (cf ContainerFile) BaseFolder(c Config) string
BaseFolder to file
func (ContainerFile) DataSize ¶ added in v0.0.13
func (cf ContainerFile) DataSize() int
DataSize path to file
func (ContainerFile) PathToFile ¶
func (cf ContainerFile) PathToFile(c Config) string
PathToFile path to file
func (ContainerFile) PathToFileFromFolder ¶
func (cf ContainerFile) PathToFileFromFolder(folder string) string
PathToFileFromFolder path to file
func (ContainerFile) PrefixAndFilename ¶ added in v0.0.13
func (cf ContainerFile) PrefixAndFilename() (prefix string, filename string)
PrefixAndFilename give prefix use as a frst folder to limit the count of file per folder and the filename
func (ContainerFile) ShardIndex ¶
func (cf ContainerFile) ShardIndex(shardCount uint32) uint32
ShardIndex compute the shard index for a container file