commands

package
v0.0.0-...-604993b Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: ISC Imports: 42 Imported by: 0

Documentation

Overview

Package commands implements command constructors for the main command.

Index

Constants

View Source
const (
	EOT = 0x4
)

Variables

This section is empty.

Functions

func Daemon

func Daemon() command.Command

Daemon constructs the command which hosts the file system service server.

func Mount

func Mount() command.Command

Mount constructs the command which requests the file system service to mount a system.

func Shutdown

func Shutdown() command.Command

Shutdown constructs the command which requests the file system service to stop.

func Unmount

func Unmount() command.Command

Unmount constructs the command which requests the file system service to undo the effects of a previous mount.

Types

type Client

type Client p9.Client

func Connect

func Connect(serverMaddr multiaddr.Multiaddr, options ...p9.ClientOpt) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Mount

func (c *Client) Mount(host filesystem.Host, fsid filesystem.ID, data [][]byte, options ...MountOption) error

func (*Client) Shutdown

func (c *Client) Shutdown(level shutdownDisposition) error

func (*Client) Unmount

func (c *Client) Unmount(ctx context.Context, targets []string, options ...UnmountOption) error

type MountOption

type MountOption func(*mountSettings) error

func WithGID

func WithGID(gid p9.GID) MountOption

func WithPermissions

func WithPermissions(permissions p9.FileMode) MountOption

func WithUID

func WithUID(uid p9.UID) MountOption

type UnmountOption

type UnmountOption func(*unmountSettings) error

func UnmountAll

func UnmountAll(b bool) UnmountOption

Jump to

Keyboard shortcuts

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