Documentation ¶
Index ¶
- Variables
- func Execute()
- func Fatal(err error, args ...interface{})
- func Message(format string, args ...interface{})
- func NonFatal(err error, args ...interface{})
- func OutputProgress(pendingTasks []Task, allTasks []Task, conf PipelineConfig)
- func Start(tasks []Task, pipe PipelineConfig) chan Task
- func Success(format string, args ...interface{})
- func Warning(format string, args ...interface{})
- type PipelineConfig
- type StagingStatus
- type Task
- type TaskStage
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// Repo organization/repo where client releases are published
Repo = "textileio/textile"
)
Functions ¶
func Fatal ¶
func Fatal(err error, args ...interface{})
Fatal prints a fatal error to stdout, and exits immediately with error code 1.
func NonFatal ¶
func NonFatal(err error, args ...interface{})
NonFatal prints a fatal error to stdout.
func OutputProgress ¶
func OutputProgress(pendingTasks []Task, allTasks []Task, conf PipelineConfig)
OutputProgress starts the pipeline and outputs progress to file or terminal.
Types ¶
type PipelineConfig ¶
type PipelineConfig struct {
// contains filtered or unexported fields
}
PipelineConfig config for task pipeline.
type StagingStatus ¶
type StagingStatus struct {
// contains filtered or unexported fields
}
StagingStatus tracks the available resources on staging.
func (*StagingStatus) Done ¶
func (sc *StagingStatus) Done(bytes int64)
Done frees space being held on staging for a task.
type Task ¶
type Task struct { Name string `json:"name,omitempty"` Path string `json:"path,omitempty"` Bytes int64 `json:"bytes,omitempty"` IsDir bool `json:"isDir,omitempty"` IsHidden bool `json:"isHidden,omitempty"` CID string `json:"cid,omitempty"` JobID string `json:"jobID,omitempty"` Stage TaskStage `json:"stage,omitempty"` Error string `json:"error,omitempty"` Deals []*userPb.StorageJob `json:"deals,omitempty"` // contains filtered or unexported fields }
Task is an individual data collection to be stored on Filecoin.
type TaskStage ¶
type TaskStage int
TaskStage is an int representing the task stage.
const ( // DryRunComplete is the end status for dry-run tasks. DryRunComplete TaskStage = iota // Init is a newly created task. Init // Staging is a task being uploaded to staging. Staging // StagingComplete is a task that exists on staging. StagingComplete // PushingJob is a task config being pushed to Pow. PushingJob // PushComplete is a task in the job queue of the Pow. PushComplete // DealsStarting is when a job when the watcher is waiting for an update. DealsStarting // DealsQueued when the job is in the Powergate queue. DealsQueued // DealsExecuting is when miners have been found and the deal is processing. DealsExecuting // DealsComplete means all deals have finished. DealsComplete // Complete task. Complete )
func (TaskStage) MarshalJSON ¶
MarshalJSON turns our TaskStage to valid json.
func (*TaskStage) UnmarshalJSON ¶
UnmarshalJSON turns json to TaskStage.
Click to show internal directories.
Click to hide internal directories.