remote

package
v0.0.0-...-9cff73d Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Timer = func() func() time.Duration {
	t0 := time.Now()
	return func() time.Duration {
		return time.Now().Sub(t0)
	}
}

Functions

func CreateFake

func CreateFake(path string) error

Types

type Event

type Event struct {
	Type     Operation
	Path     string
	Object   object.Object
	Duration time.Duration
}

type Operation

type Operation = int
const (
	Upload Operation = iota
	Download
)

type Remote

type Remote interface {
	Close() error
	Set(context.Context) (object.Set, error)
	Upload(context.Context, object.Set, func(Event)) error
}

func Open

func Open(ctx context.Context, spec string, allowFakes bool) (Remote, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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