zkfs

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package zkfs provides utilities for working with zookeepr in a filesystem-like manner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatACL

func FormatACL(acl zk.ACL) string

FormatACL returns a string representation of a zookeeper ACL permission.

func IsFile

func IsFile(path string) bool

IsFile returns true if the path is a zk type of file.

func ParsePermMode

func ParsePermMode(mode string) (mask int32)

ParsePermMode parses the mode string as a perm mask.

Types

type FS

type FS struct {
	Conn *zk2topo.ZkConn
}

FS wraps a zk2topo connection to provide FS utility methods.

func (*FS) CopyContext

func (fs *FS) CopyContext(ctx context.Context, src, dst string) error

CopyContext copies the contents of src to dst.

func (*FS) MultiCopyContext

func (fs *FS) MultiCopyContext(ctx context.Context, args []string) error

MultiCopyContext copies the contents of multiple sources to a single dst directory.

func (*FS) ReadContext

func (fs *FS) ReadContext(ctx context.Context, path string) (data []byte, err error)

ReadContext reads the data stored at path.

func (*FS) WriteContext

func (fs *FS) WriteContext(ctx context.Context, path string, data []byte) (err error)

WriteContext writes the given data to path.

type Item

type Item struct {
	Path string
	Data []byte
	Stat *zk.Stat
	Err  error
}

Item represents an item in a zookeeper filesystem.

Jump to

Keyboard shortcuts

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