sftp

package
v0.0.0-...-4ba1123 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

Jump to

Keyboard shortcuts

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