v0.0.0-...-810cf82 Latest Latest

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

Go to latest
Published: Dec 29, 2019 License: MIT Imports: 38 Imported by: 27




This section is empty.


View Source
var ErrNotMounted = errors.New("not currently mounted")


This section is empty.


type App

type App struct {
	DataDir string

	DB *db.DB

	Keys *CryptoKeys
	// contains filtered or unexported fields

func New

func New(dataDir string, options ...AppOption) (app *App, err error)

func (*App) Close

func (app *App) Close()

func (*App) Debug

func (app *App) Debug(msg interface{})

func (*App) DialPeer

func (app *App) DialPeer(pub *peer.PublicKey) (PeerClient, error)

func (*App) GetTLSConfig

func (app *App) GetTLSConfig() (*tls.Config, error)

func (*App) GetVolume

func (app *App) GetVolume(id *db.VolumeID) (*VolumeRef, error)

func (*App) GetVolumeByName

func (app *App) GetVolumeByName(name string) (*VolumeRef, error)

func (*App) OpenKV

func (app *App) OpenKV(tx *db.Tx, storage *db.VolumeStorage) (kv.KV, error)

func (*App) OpenKVForPeer

func (app *App) OpenKVForPeer(pub *peer.PublicKey) (kv.KV, error)

func (*App) ValidateKV

func (app *App) ValidateKV(backend string) error

type AppOption

type AppOption appOption

func Debug

func Debug(fn func(msg interface{})) AppOption

type CryptoKeys

type CryptoKeys struct {
	Sign struct {
		Pub  *[ed25519.PublicKeySize]byte
		Priv *[ed25519.PrivateKeySize]byte
	Box struct {
		Pub  *[32]byte
		Priv *[32]byte

type PeerClient

type PeerClient interface {

type VolumeRef

type VolumeRef struct {
	// contains filtered or unexported fields

func (*VolumeRef) Close

func (ref *VolumeRef) Close()

func (*VolumeRef) FS

func (ref *VolumeRef) FS() *fs.Volume

FS returns the underlying filesystem implementation.

Caller must keep a reference to VolumeRef for the duration

func (*VolumeRef) Mount

func (ref *VolumeRef) Mount(mountpoint string) error

Mount makes the contents of the volume visible at the given mountpoint. If Mount returns with a nil error, the mount has occurred.

func (*VolumeRef) Protocol

func (ref *VolumeRef) Protocol() (*fuse.Protocol, error)

Protocol returns the underlying FUSE protocol version.

Caller must keep a reference to VolumeRef for the duration

func (*VolumeRef) WaitForUnmount

func (ref *VolumeRef) WaitForUnmount() error


Path Synopsis

Jump to

Keyboard shortcuts

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