Documentation
¶
Index ¶
Constants ¶
View Source
const ( CopyAction = "export:copy" DeleteAction = "export:delete" TouchAction = "export:touch" DoneAction = "export:done" )
Variables ¶
View Source
var ( ErrMissingColumns = errors.New("missing columns in differences result") ErrConflict = errors.New("cannot generate task for conflict in diff") )
Functions ¶
func GenerateTasksFromDiffs ¶
func GenerateTasksFromDiffs(exportID string, dstPrefix string, diffs catalog.Differences, generateSuccessFor func(path string) bool) ([]parade.TaskData, error)
GenerateTasksFromDiffs converts diffs into many tasks that depend on startTaskID, with a "generate success" task after generating all files in each directory that matches generateSuccessFor.
Types ¶
type DeleteData ¶
type DeleteData struct {
File string `json:"file"`
}
type DirMatchCache ¶
type DirMatchCache struct {
// contains filtered or unexported fields
}
func NewDirMatchCache ¶
func NewDirMatchCache(pred func(path string) bool) *DirMatchCache
type SuccessData ¶
type SuccessData struct {
File string `json:"file"`
}
type SuccessTasksTreeGenerator ¶
type SuccessTasksTreeGenerator struct {
// contains filtered or unexported fields
}
SuccessTasksTreeGenerator accumulates success tasks during task generator. It is exported (only) for testing.
func (*SuccessTasksTreeGenerator) AddFor ¶
func (s *SuccessTasksTreeGenerator) AddFor(path string) (parade.TaskID, error)
AddFor adds a dependency task for path (there will always be exactly one, either to create a success file after path, or to finish everything), and returns its task ID for the caller to signal when done.
func (*SuccessTasksTreeGenerator) GenerateTasksTo ¶
func (s *SuccessTasksTreeGenerator) GenerateTasksTo(tasks []parade.TaskData) []parade.TaskData
GenerateTasksTo generates and appends all success tasks and the finished task to tasks, returning a new tasks slice.
Click to show internal directories.
Click to hide internal directories.