util

package
v0.0.0-...-adb0196 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffTaskState

func DiffTaskState(old common.DesiredState, new common.DesiredState) ([]string, []string, []string)

DiffTaskState picks out what added/deleted/changed between old DesiredState and new DesiredState.

func DiffWorkerState

func DiffWorkerState(old common.WorkerTableView, new common.WorkerTableView) ([]string, []string, []string)

DiffWorkerState picks out what added/deleted/changed between old WorkerTableView and new WorkerTableView.

func GetPort

func GetPort(endpoint string) int

GetPort gets port number from endpoint.

func RandomBackoff

func RandomBackoff()

RandomBackoff offers 1s~2s time backoff.

func UpdateWorkerStatus

func UpdateWorkerStatus(added bool, clone bool, wStatus *pb.WorkerStatus, task *pb.Task) *pb.WorkerStatus

UpdateWorkerStatus updates worker's status when task added or removed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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