Documentation
¶
Index ¶
- func BuildStats(parent *Node)
- func ConvertTask(taskJson map[string]*json.RawMessage) db.Task
- func GetStatFromTask(task db.Task, prop string) float64
- func HandleTasks(taskChannel <-chan db.Task, taskNodes map[string]*Node)
- func SplitTaskKey(taskKey string) (string, string, string)
- type Node
- type StatAPI
- type Stats
- type TaskAPI
- func (a *TaskAPI) GetRequestTaskGraph(requestId string) (*Node, error)
- func (a *TaskAPI) GetTaskForKey(taskKey string) (db.Task, error)
- func (a *TaskAPI) ListAddresses() (WeightedScoreList, error)
- func (a *TaskAPI) ListRequestTaskKeys(requestId string) (WeightedScoreList, error)
- func (a *TaskAPI) ListRequestTaskKeysAsSet(requestId string) (map[string]int, error)
- func (a *TaskAPI) ListRequests(address string) (WeightedScoreList, error)
- func (a *TaskAPI) ListTaskKeys(taskId string) (WeightedScoreList, error)
- func (a *TaskAPI) LoadTask(taskKey string, taskChannel chan<- db.Task)
- func (a *TaskAPI) ProcessTaskKeys(requestId string, taskKeys map[string]int, parent *Node) *Node
- func (a *TaskAPI) SaveTask(task db.Task) (string, error)
- func (a *TaskAPI) SetTaskInfo(taskKey string, node *Node)
- type WeightedScore
- type WeightedScoreList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildStats ¶
func BuildStats(parent *Node)
func ConvertTask ¶
func ConvertTask(taskJson map[string]*json.RawMessage) db.Task
Types ¶
type Node ¶
type Node struct { TaskId string `json:"task_id"` Key string `key` Name string `json:"name"` ContextId string `json:"context_id"` Children []*Node `json:"children"` Keys []string `json:"keys"` // Handles multiple runs of the same task IsParent bool `json:"is_parent"` Status int `json:"status"` Latency float64 `json:"latency"` RunTime float64 `json:"run_time"` Stats map[string]*Stats // contains filtered or unexported fields }
func BuildChildNode ¶
func BuildParentNode ¶
type StatAPI ¶
type StatAPI struct {
// contains filtered or unexported fields
}
func NewStatAPI ¶
func (*StatAPI) GetStatForRequest ¶
func (*StatAPI) MakeRequestStats ¶
type TaskAPI ¶
type TaskAPI struct {
// contains filtered or unexported fields
}
func NewTaskAPI ¶
func (*TaskAPI) GetRequestTaskGraph ¶
func (*TaskAPI) ListAddresses ¶
func (a *TaskAPI) ListAddresses() (WeightedScoreList, error)
func (*TaskAPI) ListRequestTaskKeys ¶
func (a *TaskAPI) ListRequestTaskKeys(requestId string) (WeightedScoreList, error)
func (*TaskAPI) ListRequestTaskKeysAsSet ¶
func (*TaskAPI) ListRequests ¶
func (a *TaskAPI) ListRequests(address string) (WeightedScoreList, error)
Returns a byte array of a jsonified list of strings (request ids).
func (*TaskAPI) ListTaskKeys ¶
func (a *TaskAPI) ListTaskKeys(taskId string) (WeightedScoreList, error)
func (*TaskAPI) ProcessTaskKeys ¶
func (*TaskAPI) SetTaskInfo ¶
type WeightedScore ¶
A data structure to hold a key/value pair.
type WeightedScoreList ¶
type WeightedScoreList []WeightedScore
A slice of Pairs that implements sort.Interface to sort by Value.
func (WeightedScoreList) Len ¶
func (p WeightedScoreList) Len() int
func (WeightedScoreList) Less ¶
func (p WeightedScoreList) Less(i, j int) bool
func (WeightedScoreList) Swap ¶
func (p WeightedScoreList) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.