rcp

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInput = errors.New("The source is not specified")

ErrInput error type of source is not specified

View Source
var ErrOutput = errors.New("The destination is not specified")

ErrOutput error type of destination is not specified

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	Size             uint64
	AvgByteSec       uint64
	InputByteSec     uint64
	InputMaxByteSec  uint64
	OutputByteSec    uint64
	OutputMaxByteSec uint64
	BufferUsed       uint64
	BufferMaxUsed    uint64
}

Metrics progres metrics

type Rcp

type Rcp struct {
	MaxBufNum    int
	BufSize      int
	SingleThread bool
	DummyInput   int64
	DummyOutput  bool
	DialAddr     string
	Output       string
	Input        string
	ListenAddr   string
	*SpeedDashboard
}

Rcp configs

func (*Rcp) ReadWrite

func (rcp *Rcp) ReadWrite() (size int64, err error)

ReadWrite mode

type SpeedDashboard

type SpeedDashboard struct {
	UIIface
	InputName    string
	OutputName   string
	ProgressSize int
	TotalSize    int64

	Title    *widgets.Paragraph
	Output   *widgets.Sparkline
	Input    *widgets.Sparkline
	Buffer   *widgets.Sparkline
	Progress *widgets.Gauge
	Buffers  *widgets.SparklineGroup
	Speeds   *widgets.SparklineGroup
	Metrics
	Ch chan Metrics
}

SpeedDashboard status dash board

func NewSpeedDashboard

func NewSpeedDashboard() *SpeedDashboard

NewSpeedDashboard create SpeedDashboard struct

func (*SpeedDashboard) Run

func (s *SpeedDashboard) Run(ctx context.Context) error

Run speed dashboard

type UIIface

type UIIface interface {
	Init() error
	Close()
	TerminalDimensions() (int, int)
	Render(items ...ui.Drawable)
	PollEvents() <-chan ui.Event
}

UIIface ui interface

Jump to

Keyboard shortcuts

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