Help us shape the future of Go! Take the 2026 Go Developer Survey

share

package
v0.0.0-...-0148122 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Overview

Package share publishes a directory as an NFSv3 export behind a tailcat address.

Index

Constants

View Source
const (
	// PortNFS carries the NFSv3 and MOUNT protocols on one TCP stream.
	PortNFS uint16 = 2049
	// PortInfo returns one JSON Info document per connection, then closes.
	PortInfo uint16 = 2050
)

Tunnel ports served by a tailmount sharer. Clients dial these through the tailcat tunnel; nothing listens on them on the host network.

View Source
const (
	ModeReadWrite = "rw"
	ModeReadOnly  = "ro"
)

Access modes a share can be published with.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, o Options) error

Run publishes the directory until ctx is cancelled, then shuts down.

Types

type Info

type Info struct {
	Mode    string `json:"mode"`
	Name    string `json:"name"`
	Version string `json:"version"`
}

Info describes a share to a client before it mounts. The client needs the mode to pick the right mount flag and the name to choose a mountpoint.

type Options

type Options struct {
	// Dir is the directory to publish. Empty means the working directory.
	Dir string
	// ReadOnly enforces read-only access on the server.
	ReadOnly bool
	// Verbose enables tailcat and go-nfs diagnostic logging.
	Verbose bool
	// Out receives the address and instructions for humans. Defaults to stdout.
	Out io.Writer
}

Options configure a share.

Jump to

Keyboard shortcuts

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