config

package
v0.0.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2021 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

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
	SqliteArchiverJournalMode string
	SqliteArchiverSynchronous string
	DisableResumeArchiving    bool
}

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

type ContainerFile struct {
	Container string
	Bucket    string
	SubBucket string
	TableName string
}

ContainerFile container file

func NewContainerFileWTableName

func NewContainerFileWTableName(container string, bucket string, subBucket string, table string) ContainerFile

NewContainerFileWTableName new container file

func ParseContainerFileFromActivePath added in v0.0.23

func ParseContainerFileFromActivePath(b string) (*ContainerFile, error)

ParseContainerFileFromActivePath parse file path

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) Key

func (cf ContainerFile) Key() string

Key string representing the config

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL