hh

package
v0.0.0-...-024d10c Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HConnection

type HConnection struct {
	User   dataprovider.User
	ConnID string
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(conn MyConn, user dataprovider.User, connID string, protocol string) *HConnection

/////////////////////////////

func (*HConnection) Close

func (h *HConnection) Close()

func (HConnection) Filecmd

func (h HConnection) Filecmd(request *sftp.Request) error

func (HConnection) Filelist

func (h HConnection) Filelist(request *sftp.Request) (sftp.ListerAt, error)

func (HConnection) Fileread

func (h HConnection) Fileread(request *sftp.Request) (io.ReaderAt, error)

func (HConnection) Filewrite

func (h HConnection) Filewrite(request *sftp.Request) (io.WriterAt, error)

func (*HConnection) MkHdfsClient

func (h *HConnection) MkHdfsClient(conf_str string, user string, hosts string) error

type HTransfer

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

func (*HTransfer) Close

func (t *HTransfer) Close() error

Close it is called when the transfer is completed. It closes the underlying file, log the transfer info, update the user quota, for uploads, and execute any defined actions.

func (*HTransfer) ReadAt

func (t *HTransfer) ReadAt(p []byte, off int64) (n int, err error)

ReadAt reads len(p) bytes from the File to download starting at byte offset off and updates the bytes sent. It handles download bandwidth throttling too

func (*HTransfer) WriteAt

func (t *HTransfer) WriteAt(p []byte, off int64) (n int, err error)

WriteAt writes len(p) bytes to the uploaded file starting at byte offset off and updates the bytes received. It handles upload bandwidth throttling too

type MyConn

type MyConn interface {
	ActiveTime()
}

Jump to

Keyboard shortcuts

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