config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0, MIT Imports: 4 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
	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

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 ParseContainerFileKey

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

ParseContainerFileKey parse a container file from string

func (ContainerFile) ArchivePath

func (cf ContainerFile) ArchivePath(archiveFolder string, shardIndex, walIndex, operationIndex int) string

ArchivePath path to the arvhive file

func (ContainerFile) BaseFolder

func (cf ContainerFile) BaseFolder(c Config) string

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