blast

package
v0.0.0-...-0125c53 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UPLOADED action = iota
	UPDATED
	MATCHED
	FAILED
)

Variables

This section is empty.

Functions

func NewHasher

func NewHasher(iChan <-chan string) (<-chan *Result, error)

func NewScanner

func NewScanner(root string, ignoredot bool, maxfiles int) (<-chan string, error)

func NewWorker

func NewWorker(wg *sync.WaitGroup, client *s3.Client, reducedRedundancy bool, bucket, prefix string, srcprefix string, iChan <-chan *Result, oChan chan<- *Result) error

Types

type ReadCounter

type ReadCounter interface {
	Read(p []byte) (int, error)

	TotalReads() uint
	TotalBytes() uint64
}

func NewReadCounter

func NewReadCounter(in io.Reader) ReadCounter

type Result

type Result struct {
	Action action
	Path   string
	Hash   string
	Size   uint64
	Error  error
}

type Summarizer

type Summarizer struct {
	StartTime     time.Time
	EndTime       time.Time
	TotalFiles    uint64
	TotalUploaded uint64
	TotalUpdated  uint64
	TotalMatched  uint64
	TotalFailed   uint64
	TotalBytes    uint64
	// contains filtered or unexported fields
}

func NewSummarizer

func NewSummarizer(wg *sync.WaitGroup, verbose bool) (*Summarizer, chan<- *Result)

func (*Summarizer) ExitStatus

func (s *Summarizer) ExitStatus() int

func (*Summarizer) Report

func (s *Summarizer) Report()

func (*Summarizer) Run

func (s *Summarizer) Run()

Jump to

Keyboard shortcuts

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