backend

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoSuchBackend is returned when passing an invalid backend name
	ErrNoSuchBackend = errors.New("No such backend")
)

Functions

func ForwardLogByName added in v0.2.0

func ForwardLogByName(name string, w io.Writer) error

ForwardLogByName will forward the logs of the backend `name` to `w`.

func InitByName

func InitByName(name, path string) error

InitByName creates a new backend structure at `path` for the backend `name`

func IsValidName

func IsValidName(name string) bool

IsValidName tells you if `name` is a valid backend name.

Types

type Backend

type Backend interface {
	repo.Backend
	catfs.FsBackend
	netBackend.Backend
}

Backend is a amalgamation of all backend interfaces required for brig to work.

func FromName

func FromName(name, path string, bootstrapNodes []string) (Backend, error)

FromName returns a suitable backend for a human readable name. If an invalid name is passed, nil is returned.

type VersionInfo

type VersionInfo interface {
	SemVer() string
	Name() string
	Rev() string
}

VersionInfo is a small interface that will return version info about the backend.

func Version

func Version(name string) VersionInfo

Version returns version info for the backend `name`.

Directories

Path Synopsis
Package ipfs implements an interface to ipfs's codebase that also fulfills the backend.Backend interface.
Package ipfs implements an interface to ipfs's codebase that also fulfills the backend.Backend interface.

Jump to

Keyboard shortcuts

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