Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorIsNotDirectory = errors.New("the input dir is not a directory") ErrorEmptyDirectory = errors.New("the dir is empty") )
View Source
var (
ErrorNilOption = errors.New("the option is not set")
)
Functions ¶
This section is empty.
Types ¶
type LocalSyncer ¶
type LocalSyncer struct {
// contains filtered or unexported fields
}
func (*LocalSyncer) Persistent ¶
type S3Syncer ¶
type S3Syncer struct {
// contains filtered or unexported fields
}
func (*S3Syncer) Persistent ¶
type Synchronizer ¶
type Synchronizer interface { // Persistent - save data Persistent(ctx context.Context, key string, data io.Reader) (location string, err error) // PickOne - randomly pick one PickOne(ctx context.Context) (location string, err error) }
Synchronizer - sync remote data into local
func NewLocalSyncer ¶
func NewLocalSyncer(dir string) (Synchronizer, error)
func NewS3Syncer ¶
func NewS3Syncer(opt *Option) (Synchronizer, error)
Click to show internal directories.
Click to hide internal directories.