saboreader

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader reader with limiter

func NewReaderWithContext

func NewReaderWithContext(ctx context.Context, r io.Reader, workDir string, bw uint64) (*Reader, error)

NewReaderWithContext returns a reader that implements io.Reader with rate limiting.

func (*Reader) CleanUp

func (s *Reader) CleanUp()

CleanUp clean up lockfile

func (*Reader) Read

func (s *Reader) Read(p []byte) (int, error)

Read reads bytes into p.

func (*Reader) RefreshLimiter

func (s *Reader) RefreshLimiter(ctx context.Context) error

RefreshLimiter refresh limiter

func (*Reader) RunRefresh

func (s *Reader) RunRefresh(ctx context.Context)

RunRefresh refresh limiter regularly

Jump to

Keyboard shortcuts

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