master

package
v0.0.0-...-04cccb0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobJSON

type JobJSON struct {
	ID         int           `json:"id"`
	Salt       []byte        `json:"salt"`
	Digest     []byte        `json:"digest"`
	KeyLen     int           `json:"keyLen"`
	Iter       int           `json:"iter"`
	Alphabet   lib.Alphabet  `json:"alphabet"`
	Algorithm  lib.Algorithm `json:"algorithm"`
	Tasks      []TaskJSON    `json:"tasks"`
	StartTime  time.Time     `json:"startTime"`
	FinishTime time.Time     `json:"finishTime"`
	Password   string        `json:"password"`
}

type Master

type Master struct {
	// contains filtered or unexported fields
}

func Init

func Init(port, ip string, kp, ki, kd float64) Master

Init creates the master object

func (*Master) Run

func (m *Master) Run()

Run starts the master

type SlaveJSON

type SlaveJSON struct {
	IP       string     `json:"ip"`
	MaxSlots int        `json:"maxSlots"`
	Tasks    []TaskJSON `json:"tasks"`
}

type StatusJSON

type StatusJSON struct {
	RequiredSlots  int         `json:"requiredSlots"`
	AvailableSlots int         `json:"availableSlots"`
	Slaves         []SlaveJSON `json:"slaves"`
	Jobs           []JobJSON   `json:"jobs"`
	CompletedJobs  []JobJSON   `json:"completedJobs"`
}

type TaskJSON

type TaskJSON struct {
	ID       int    `json:"id"`
	JobID    int    `json:"jobId"`
	Start    string `json:"start"`
	TaskLen  int    `json:"taskLen"`
	Progress string `json:"progress"`
}

Jump to

Keyboard shortcuts

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