utils

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCSweepInterval = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FunctionManagerStatistics added in v0.0.6

type FunctionManagerStatistics struct {
	FunctionIDToTasks map[uuid.UUID]uint64 `json:"function_id_to_tasks"`
}

type MessageTypeStatistics added in v0.0.6

type MessageTypeStatistics struct {
	Task               uint64 `json:"Task"`
	TaskEcho           uint64 `json:"TaskEcho"`
	TaskCancel         uint64 `json:"TaskCancel"`
	TaskCancelEcho     uint64 `json:"TaskCancelEcho"`
	TaskResult         uint64 `json:"TaskResult"`
	Heartbeat          uint64 `json:"Heartbeat"`
	FunctionRequest    uint64 `json:"FunctionRequest"`
	FunctionResponse   uint64 `json:"FunctionResponse"`
	MonitoringRequest  uint64 `json:"MonitoringRequest"`
	MonitoringResponse uint64 `json:"MonitoringResponse"`
}

type SchedulerStatistics added in v0.0.6

type SchedulerStatistics struct {
	Received        *MessageTypeStatistics     `json:"received"`
	Sent            *MessageTypeStatistics     `json:"sent"`
	TaskManager     *TaskManagerStatistics     `json:"task_manager"`
	FunctionManager *FunctionManagerStatistics `json:"function_manager"`
	WorkerManager   *WorkerManagerStatistics   `json:"worker_manager"`
}

type TaskManagerStatistics added in v0.0.6

type TaskManagerStatistics struct {
	Running    uint64 `json:"running"`
	Canceling  uint64 `json:"canceling"`
	Unassigned uint64 `json:"unassigned"`
	Failed     uint64 `json:"failed"`
	Canceled   uint64 `json:"canceled"`
}

type WorkerHeap

type WorkerHeap struct {
	Entries         []*WorkerHeapEntry
	WorkerIDToEntry map[string]*WorkerHeapEntry
}

func NewWorkerHeap

func NewWorkerHeap() *WorkerHeap

func (*WorkerHeap) AddTasks

func (h *WorkerHeap) AddTasks(workerID string, count int) int

func (WorkerHeap) Len

func (h WorkerHeap) Len() int

func (WorkerHeap) Less

func (h WorkerHeap) Less(i, j int) bool

func (*WorkerHeap) Peek

func (h *WorkerHeap) Peek() *WorkerHeapEntry

func (*WorkerHeap) Pop

func (h *WorkerHeap) Pop() any

func (*WorkerHeap) Push

func (h *WorkerHeap) Push(x any)

func (WorkerHeap) Swap

func (h WorkerHeap) Swap(i, j int)

type WorkerHeapEntry

type WorkerHeapEntry struct {
	WorkerID string
	Tasks    int
	Index    int
}

type WorkerManagerStatistics added in v0.0.6

type WorkerManagerStatistics struct {
	Type          string            `json:"type"`
	WorkerToTasks map[string]uint64 `json:"worker_to_tasks"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL