pool

package
v0.0.0-...-b06e673 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closer

type Closer interface {
	Close() error
}

type Option

type Option func(wp *WorkerPool)

func WithContext

func WithContext(ctx context.Context) Option

func WithDownload

func WithDownload(fn transferFn) Option

func WithMaxSize

func WithMaxSize(max int) Option

func WithUpload

func WithUpload(fn transferFn) Option

type WorkerPool

type WorkerPool struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool(config *ssh.ClientConfig, ipPort string, opts ...Option) *WorkerPool

NewPool creates a new pool of connections and starts GC. If no configuration is specified (nil), defaults values are used.

func (*WorkerPool) Close

func (p *WorkerPool) Close()

func (*WorkerPool) DownloadFile

func (p *WorkerPool) DownloadFile(src, dest string)

func (*WorkerPool) UploadFile

func (p *WorkerPool) UploadFile(src, dest string)

func (*WorkerPool) Wait

func (p *WorkerPool) Wait() error

Directories

Path Synopsis
An example SFTP server implementation using the golang SSH package.
An example SFTP server implementation using the golang SSH package.

Jump to

Keyboard shortcuts

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