cmdstorage

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 36 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 --store has the form "@name", the storage spec associated with that
name in the FFS config file is used (if defined).

The --listen flag must be one of:

 - A label of the form "@name": The address associated with that name
   in the FFS config file is used. If --listen is empty and the --store
   flag has the form "@name", it uses the address from that setting.

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

 - Otherwise: The 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 --cipher).
The contents of the --key file are used as the cipher key.
If the file has the format of http://godoc.org/github.com/creachadair/keyfile,
it is unlocked using a passphrase, from the FFS_PASSPHRASE environment or
prompted at the terminal. Otherwise its contents are used verbatim

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),

	Commands: []*command.C{{
		Name:  "keygen",
		Usage: "<key-file>",
		Help:  "Generate a random encryption key into the specified file.",
		Run:   command.Adapt(runKeyGen),
	}},
}

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