Documentation ¶
Index ¶
- Variables
- type Callback
- type Dag
- func (dag *Dag) AddEdge(fromKey, toKey interface{}) error
- func (dag *Dag) AddNode(key interface{}) error
- func (dag *Dag) FromProto(msg proto.Message) error
- func (dag *Dag) GetChildrenNodes(key interface{}) []*Node
- func (dag *Dag) GetNode(key interface{}) *Node
- func (dag *Dag) GetNodes() []*Node
- func (dag *Dag) GetRootNodes() []*Node
- func (dag *Dag) IsCirclular() bool
- func (dag *Dag) Len() int
- func (dag *Dag) String() string
- func (dag *Dag) ToProto() (proto.Message, error)
- type Dispatcher
- type Node
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyNotFound = errors.New("not found") ErrKeyIsExisted = errors.New("already existed") ErrInvalidProtoToDag = errors.New("Protobuf message cannot be converted into Dag") ErrInvalidDagToProto = errors.New("Dag cannot be converted into Protobuf message") )
Errors
View Source
var ( ErrDagHasCirclular = errors.New("dag hava circlular") ErrTimeout = errors.New("dispatcher execute timeout") )
Errors
Functions ¶
This section is empty.
Types ¶
type Dag ¶
type Dag struct {
// contains filtered or unexported fields
}
Dag struct
func (*Dag) GetChildrenNodes ¶
GetChildrenNodes get children nodes with key
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher struct a message dispatcher dag.
func NewDispatcher ¶
func NewDispatcher(dag *Dag, concurrency int, elapseInMs int64, context interface{}, cb Callback) *Dispatcher
NewDispatcher create Dag Dispatcher instance.
Click to show internal directories.
Click to hide internal directories.