client

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerFuseClient

type DockerFuseClient struct {
	// contains filtered or unexported fields
}

DockerFuseClient is used to communicate with the Docker API server

func NewDockerFuseClient

func NewDockerFuseClient(containerID string) (*DockerFuseClient, error)

NewDockerFuseClient returns a new DockerFuseClient pointer

type DockerFuseClientInterface

type DockerFuseClientInterface interface {
	// contains filtered or unexported methods
}

DockerFuseClientInterface can be used to write unit tests

type Node

type Node struct {
	fusefs.Inode

	Data []byte
	// contains filtered or unexported fields
}

Node is a filesystem node used by dockerfuse to represent directories, files or links

func NewNode

func NewNode(fuseDockerClient DockerFuseClientInterface, fullPath string, linkTarget string) *Node

NewNode creates a new Node

func (*Node) Create

func (node *Node) Create(ctx context.Context, name string, flags uint32, mode uint32, out *fuse.EntryOut) (newNode *fusefs.Inode, fh fusefs.FileHandle, fuseFlags uint32, errno syscall.Errno)

Create creates a new file within the directory represented by node.

func (*Node) Flush

func (node *Node) Flush(ctx context.Context, fh fusefs.FileHandle) (syserr syscall.Errno)

Flush closes any cached state for the given handle.

func (*Node) Fsync

func (node *Node) Fsync(ctx context.Context, fh fusefs.FileHandle, flags uint32) (syserr syscall.Errno)

Fsync forwards a file synchronization request to the container.

func (*Node) Getattr

func (node *Node) Getattr(ctx context.Context, fh fusefs.FileHandle, out *fuse.AttrOut) (errno syscall.Errno)

Getattr retrieves attributes for this node.

func (node *Node) Link(ctx context.Context, target fusefs.InodeEmbedder, name string, out *fuse.EntryOut) (newNode *fusefs.Inode, errno syscall.Errno)

Link creates a hard link named name pointing to target.

func (*Node) Lookup

func (node *Node) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (n *fusefs.Inode, syserr syscall.Errno)

Lookup looks for a child called name below this node.

func (*Node) Lseek

func (node *Node) Lseek(ctx context.Context, fh fusefs.FileHandle, off uint64, whence uint32) (n uint64, syserr syscall.Errno)

Lseek changes the read/write offset of a file handle.

func (*Node) Mkdir

func (node *Node) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (newNode *fusefs.Inode, errno syscall.Errno)

Mkdir creates a new directory under node with the given name.

func (*Node) Open

func (node *Node) Open(ctx context.Context, flags uint32) (fh fusefs.FileHandle, fuseFlags uint32, syserr syscall.Errno)

Open opens the current path and returns a handle.

func (*Node) Read

func (node *Node) Read(ctx context.Context, fh fusefs.FileHandle, dest []byte, off int64) (result fuse.ReadResult, syserr syscall.Errno)

Read reads from the given file handle into dest.

func (*Node) Readdir

func (node *Node) Readdir(ctx context.Context) (ds fusefs.DirStream, errno syscall.Errno)

Readdir reads the directory contents.

func (node *Node) Readlink(ctx context.Context) (linkTarget []byte, errno syscall.Errno)

Readlink returns the target of this symbolic link.

func (*Node) Release

func (node *Node) Release(ctx context.Context, fh fusefs.FileHandle) (syserr syscall.Errno)

Release releases the handle on the remote side.

func (*Node) Rename

func (node *Node) Rename(ctx context.Context, name string, newParent fusefs.InodeEmbedder, newName string, flags uint32) (errno syscall.Errno)

Rename renames a child of this node.

func (*Node) Rmdir

func (node *Node) Rmdir(ctx context.Context, name string) (errno syscall.Errno)

Rmdir removes a directory below this node.

func (*Node) Setattr

func (node *Node) Setattr(ctx context.Context, f fusefs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) (errno syscall.Errno)

Setattr changes one or more attributes on the node.

func (node *Node) Symlink(ctx context.Context, target, name string, out *fuse.EntryOut) (newNode *fusefs.Inode, errno syscall.Errno)

Symlink creates a new symbolic link under node.

func (node *Node) Unlink(ctx context.Context, name string) (errno syscall.Errno)

Unlink removes a child node with the given name.

func (*Node) Write

func (node *Node) Write(ctx context.Context, fh fusefs.FileHandle, data []byte, off int64) (n uint32, syserr syscall.Errno)

Write writes data to the provided file handle.

Jump to

Keyboard shortcuts

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