stdin

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

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWriter

func NewWriter(cfg engine.WriterConfig) engine.IWriter

Types

type Config

type Config struct {
	StreamPrepared int `mapstructure:"writer-stream-prepared"`
	Interval       int `mapstructure:"writer-interval"`

	ProgressFormat           string `mapstructure:"writer-progress-format"`
	ProgressIncludeTableSize bool   `mapstructure:"writer-progress-include-table-size"`
	ProgressWithTimezone     bool   `mapstructure:"writer-progress-with-timezone"`
	// contains filtered or unexported fields
}

type Flags

type Flags map[string]interface{}

func (Flags) ToStr

func (fs Flags) ToStr() string

type Stat

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

func (*Stat) AddSubStat

func (s *Stat) AddSubStat(engine.Stat)

func (*Stat) GetCurrentProgress

func (s *Stat) GetCurrentProgress(_ ...interface{}) map[string]interface{}

func (*Stat) GetFormattedSummary

func (s *Stat) GetFormattedSummary() string

GetFormattedSummary is aimed at outputing statistics in certain format. No data in will be rounded.

func (*Stat) GetName

func (s *Stat) GetName() string

func (*Stat) GetProgress

func (s *Stat) GetProgress() string

func (*Stat) GetSubStats

func (s *Stat) GetSubStats() []engine.Stat

func (*Stat) GetSummary

func (s *Stat) GetSummary() string

GetSummary is aimed at presenting statistics to the user in the form of a table empowered by go-pretty. Any data in float will be rounded to 2 decimal places.

func (*Stat) GetTableCompressRatio

func (s *Stat) GetTableCompressRatio() (float64, error)

type Writer

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

func (*Writer) CreatePluginConfig

func (w *Writer) CreatePluginConfig() interface{}

func (*Writer) GetDefaultFlags

func (w *Writer) GetDefaultFlags() (*pflag.FlagSet, interface{})

func (*Writer) GetStat

func (w *Writer) GetStat() engine.Stat

func (*Writer) IsNil

func (w *Writer) IsNil() bool

func (*Writer) Start

func (w *Writer) Start(cfg engine.Config, volumeDesc engine.VolumeDesc) (<-chan error, error)

func (*Writer) Stop

func (w *Writer) Stop() error

func (*Writer) Write

func (w *Writer) Write(m []byte, cnt, size int64) error

func (*Writer) WriteEOF

func (w *Writer) WriteEOF() error

type WriterProgress

type WriterProgress struct {
	Start                   string `json:"start"`
	End                     string `json:"end"`
	Period                  string `json:"period"`
	CurrTotalRows           int64  `json:"currTotalRows"`
	TotalRows               int64  `json:"totalRows"`
	CurrPeriodRows          int64  `json:"currPeriodRows"`
	CurrTotalBytes          int64  `json:"currTotalBytes"`
	TotalBytes              int64  `json:"totalBytes"`
	CurrPeriodBytes         int64  `json:"currPeriodBytes"`
	WrittenMxgateTotal      int64  `json:"writtenMxGateTotal"`
	CurrPeriodWrittenMxgate int64  `json:"currPeriodWrittenMxGate"`
	TableSize               int64  `json:"tableSize"`
}

Jump to

Keyboard shortcuts

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