Documentation
¶
Index ¶
- func EscapeForFileName(s string) string
- func WalkDumpFile(dumpFile string, fn func(node DumpNode) error) error
- type DumpNode
- type DumpNodeString
- type Keeper
- func (k *Keeper) ChildCount(prefix, nodePath string) (int, error)
- func (k *Keeper) Close()
- func (k *Keeper) Connect(ctx context.Context, ch *clickhouse.ClickHouse) error
- func (k *Keeper) Delete(nodePath string) error
- func (k *Keeper) Dump(prefix, dumpFile string) (int, error)
- func (k *Keeper) EnsureNode(nodePath string) error
- func (k *Keeper) GetReplicatedAccessPath(userDirectory string) (string, error)
- func (k *Keeper) ResolvePath(nodePath string) string
- func (k *Keeper) Restore(dumpFile, prefix string, skipNode func(node DumpNode) bool) error
- func (k *Keeper) Upsert(nodePath string, value []byte) error
- func (k *Keeper) Walk(prefix, relativePath string, recursive bool, callback WalkCallBack) error
- type LogKeeperToApexLogAdapter
- type WalkCallBack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EscapeForFileName ¶ added in v2.8.1
EscapeForFileName - Go port of ClickHouse src/Common/escapeForFileName.cpp, used to build the `<zookeeper_path>/<type char>/<name>` znode name for RBAC objects stored in a `replicated` user directory
Types ¶
type DumpNodeString ¶ added in v2.6.35
old format used during restore
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (*Keeper) ChildCount ¶ added in v2.5.0
func (*Keeper) Connect ¶
func (k *Keeper) Connect(ctx context.Context, ch *clickhouse.ClickHouse) error
Connect - connect to any zookeeper server from /var/lib/clickhouse/preprocessed_configs/config.xml
func (*Keeper) Delete ¶ added in v2.5.0
Delete - remove znode, already removed znode is not an error, look https://github.com/Altinity/clickhouse-backup/issues/1048
func (*Keeper) EnsureNode ¶ added in v2.8.1
EnsureNode - create znode with empty value when it doesn't exist yet, nodePath shall be already resolved via ResolvePath
func (*Keeper) GetReplicatedAccessPath ¶
func (*Keeper) ResolvePath ¶ added in v2.8.1
ResolvePath - apply <zookeeper><root> chroot to the passed znode path
func (*Keeper) Restore ¶
Restore - restore keeper nodes from dumpFile under prefix, skipNode allow skip node restore, receives node with relative path from the dump, could be nil
func (*Keeper) Upsert ¶ added in v2.8.1
Upsert - create znode with value or overwrite value when znode already exists, several concurrent writers of the same znode are allowed, parent znodes are not created, use EnsureNode for that, nodePath shall be already resolved via ResolvePath, look https://github.com/Altinity/clickhouse-backup/issues/1048
type LogKeeperToApexLogAdapter ¶
type LogKeeperToApexLogAdapter struct {
// contains filtered or unexported fields
}
func (LogKeeperToApexLogAdapter) Printf ¶
func (KeeperLogToApexLogAdapter LogKeeperToApexLogAdapter) Printf(msg string, args ...interface{})