cmdstorage

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package cmdstorage implements the "ffs storage" subcommand.

Index

Constants

This section is empty.

Variables

View Source
var Command = &command.C{
	Name:  "storage",
	Usage: "--store <spec> --listen <addr> [options]",
	Help: fmt.Sprintf(`Run a storage server.

Start a server that serves content from the blob.Store described by the
--store spec. The server listens at the --listen address, which may be
a host:port or the path of a Unix-domain socket.

A store spec is a storage type and address: type:address
The types understood are: %[1]s

If --listen is:

 - A store label of the form @name: The address associated with that
   name in the FFS config file is used.

 - A host:port address: A TCP listener is created at that address.

 - Otherwise: The address must be a path for a Unix-domain socket.

With --cache, the server provides a memory cache over the primary store.

With --key, the store is opened with encryption (chosen by --encryption).

By default, the user-provided passphrase is used to unlock the key file.

If --key begins with "@" or "%%", however, the remaining string is used
as a key salt for HKDF with the user-provided passphrase. When the prefix
is "%%", the user is prompted to confirm the passphrase; with "@" no
confirmation is required. Double the "@" or "%%" to escape this treatment
of the --key argument.

If FFS_PASSPHRASE is set in the environment, it is used as the passphrase
for the key file; otherwise it prompts at the terminal.

Use --buffer to enable a local write-behind buffer. The syntax of its
argument is the same as for --store. This is suitable for primary stores
that are remote and slow (e.g., cloud storage).`,
		strings.Join(registry.Stores.Names(), ", ")),

	SetFlags: command.Flags(flax.MustBind, &flags),
	Run:      command.Adapt(runStorage),
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package registry carries the registry of available storage implementations.
Package registry carries the registry of available storage implementations.

Jump to

Keyboard shortcuts

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