Home Download Docs Code Community
import "perkeep/pkg/blobserver/sftp"
Overview
Index

Overview ▾

Package sftp registers the "sftp" blobserver storage type, storing blobs one-per-file in a forest of sharded directories to a remote SFTP server over an SSH connection. It uses the same directory & file structure as the "localdisk" storage type.

Example low-level config:

"/storage/": {
    "handler": "storage-sftp",
    "handlerArgs": {
         "user": "alice",
         "addr": "10.1.2.3",
         "dir": "/remote/path/to/store/blobs/in",
         "serverFingerprint": "SHA256:fBkTSuUzQVnVMJ9+e74XNTCnQKSHldbfFiOI9kBMemc",

         "pass": "s3cr3thunteR1!",
         "passFile": "/home/alice/keys/sftp.password"
     }
},

Index

type Storage
    func NewStorage(addr, dir string, cc *ssh.ClientConfig) (*Storage, error)
    func (s *Storage) String() string

Package files

sftp.go

type Storage

type Storage struct {
    blobserver.Storage
    blob.SubFetcher
    // contains filtered or unexported fields
}

Storage implements the blobserver.Storage interface using an SFTP server.

func NewStorage

func NewStorage(addr, dir string, cc *ssh.ClientConfig) (*Storage, error)

NewStorage returns a new SFTP storage implementation at the provided TCP addr (host:port) in the named directory. An empty dir means ".". The provided SSH client configured is required.

func (*Storage) String

func (s *Storage) String() string
Website layout inspired by memcached.
Content by the authors.