Documentation
¶
Index ¶
- Constants
- Variables
- type Item
- type Relation
- type State
- type WorkGraph
- func (wg *WorkGraph) AddItem(item *Item) int
- func (wg *WorkGraph) AddRelation(item int, state State, dependency int)
- func (wg *WorkGraph) BeginItem(item int) error
- func (wg *WorkGraph) CanSchedule(worker string) (*Item, error)
- func (wg *WorkGraph) FailItem(item int) error
- func (wg *WorkGraph) FinishItem(item int) error
- func (wg *WorkGraph) Graphviz() []byte
- func (wg *WorkGraph) Schedule(worker string) (*Item, error)
Constants ¶
View Source
const ( Source = 0 Sink = 1 )
Variables ¶
View Source
var ErrBadState = errors.New("state transition not allowed")
View Source
var ErrNoItems = errors.New("no items found")
Functions ¶
This section is empty.
Types ¶
type WorkGraph ¶
type WorkGraph struct {
Items []*Item
}
func (*WorkGraph) AddRelation ¶
func (*WorkGraph) FinishItem ¶
Click to show internal directories.
Click to hide internal directories.