Documentation ¶
Index ¶
- Constants
- func CleanWorker(n int, cli *s3.S3, jobs <-chan *CleanWorkerIn, results chan<- bool)
- func DisposeWorker(n int, cli *s3.S3, jobs <-chan *DisposeWorkerIn, results chan<- bool)
- func InitWorker(n int, cli *s3.S3, jobs <-chan *InitWorkerIn, result chan<- bool)
- func ReadWorker(n int, cli *s3.S3, hashCheck bool, jobs <-chan *ReadWorkerIn, ...)
- func StartWorkflow(s3service *s3.S3, works []*WorkConfig, logger *logger.Logger)
- func WriteWorker(n int, cli *s3.S3, hashCheck bool, jobs <-chan *WriteWorkerIn, ...)
- type CleanWorkerIn
- type CleanWorkerOut
- type Config
- type DisposeWorkerIn
- type DisposeWorkerOut
- type InitWorkerIn
- type InitWorkerOut
- type ReadWorkerIn
- type ReadWorkerOut
- type WorkConfig
- type WriteWorkerIn
- type WriteWorkerOut
Constants ¶
View Source
const ( StageInit = "init" StageWrite = "write" StageRead = "read" StageClean = "clean" StageDispose = "dispose" )
Variables ¶
This section is empty.
Functions ¶
func CleanWorker ¶
func CleanWorker(n int, cli *s3.S3, jobs <-chan *CleanWorkerIn, results chan<- bool)
for bucket creation
func DisposeWorker ¶
func DisposeWorker(n int, cli *s3.S3, jobs <-chan *DisposeWorkerIn, results chan<- bool)
for bucket creation
func InitWorker ¶
func InitWorker(n int, cli *s3.S3, jobs <-chan *InitWorkerIn, result chan<- bool)
for bucket creation
func ReadWorker ¶
func StartWorkflow ¶
func StartWorkflow(s3service *s3.S3, works []*WorkConfig, logger *logger.Logger)
func WriteWorker ¶
Types ¶
type CleanWorkerIn ¶
type CleanWorkerOut ¶
func DeleteObject ¶
func DeleteObject(cli *s3.S3, bucket, key string) *CleanWorkerOut
func (*CleanWorkerOut) String ¶
func (out *CleanWorkerOut) String() string
type Config ¶
type Config struct { Host string `json:"host"` Region string `json:"region"` AccessKeyId string `json:"accessKeyId"` AccessKeySecret string `json:"accessKeySecret"` Workflow []*WorkConfig `json:"workflow"` }
type DisposeWorkerIn ¶
type DisposeWorkerIn struct {
Bucket string
}
type DisposeWorkerOut ¶
func DeleteBucket ¶
func DeleteBucket(cli *s3.S3, bucket string) *DisposeWorkerOut
func (*DisposeWorkerOut) String ¶
func (out *DisposeWorkerOut) String() string
type InitWorkerIn ¶
type InitWorkerIn struct {
Bucket string
}
type InitWorkerOut ¶
func CreateBucket ¶
func CreateBucket(cli *s3.S3, bucket string) *InitWorkerOut
func (*InitWorkerOut) String ¶
func (out *InitWorkerOut) String() string
type ReadWorkerIn ¶
type ReadWorkerOut ¶
func (*ReadWorkerOut) String ¶
func (out *ReadWorkerOut) String() string
type WorkConfig ¶
type WorkConfig struct { Stage string `json:"stage"` Concurrent int `json:"concurrent"` File string `json:"file"` Filesize int `json:"filesize"` BucketPrefix string `json:"bucketPrefix"` BucketStart int `json:"bucketStart"` // bucket name start number BucketEnd int `json:"bucketEnd"` // bucket name end number ObjectPrefix string `json:"ObjectPrefix"` ObjectStart int `json:"ObjectStart"` // object name start number ObjectEnd int `json:"ObjectEnd"` // object name end number HashCheck bool `json:"hashCheck"` // only for write|read work stage Enabled bool `json:"enabled"` // does this work enabled? }
func (*WorkConfig) BucketNumber ¶
func (wc *WorkConfig) BucketNumber() int
func (*WorkConfig) ObjectNumber ¶
func (wc *WorkConfig) ObjectNumber() int
func (*WorkConfig) ObjectTotals ¶
func (wc *WorkConfig) ObjectTotals() int
Source Files ¶
Click to show internal directories.
Click to hide internal directories.