Versions in this module Expand all Collapse all v0 v0.2.1 Aug 30, 2021 v0.2.0 Mar 7, 2019 Changes in this version + const DirectionBackward + const DirectionForward + const MaxPageLimit + const SortOrderAsc + const SortOrderDesc + var ErrWrongListDirection = errors.New("unknown direction (valid: forward or backward)") + var ErrWrongSortItem = errors.New("unknown name of item by which list should be sorted") + var ErrWrongSortOrder = errors.New("unknown sort order (valid: ascending or descending)") + type ListDirection bool + func (direction *ListDirection) MarshalText() ([]byte, error) + func (direction *ListDirection) UnmarshalText(text []byte) error + func (direction ListDirection) String() string + type ListInfo struct + RemainingItems uint64 + TotalItems uint64 + type RequestsPaginator struct + Direction ListDirection + ID ReqID + Limit uint16 + type SortInfo struct + Item string + Order SortOrder + type SortOrder bool + func (order *SortOrder) MarshalText() ([]byte, error) + func (order *SortOrder) UnmarshalText(text []byte) error + func (order SortOrder) String() string + type WorkersPaginator struct + Direction ListDirection + ID WorkerUUID + Limit uint16 v0.1.0 Oct 9, 2018 Changes in this version + const Version + var ErrInternalLogicError = errors.New("Boruta's internal logic error") + type AccessInfo struct + Addr net.Addr + Key rsa.PrivateKey + Username string + type Capabilities map[string]string + func (caps Capabilities) GetWorkerUUID() WorkerUUID + type Dryad interface + Healthcheck func() (err error) + Prepare func(key *ssh.PublicKey) (err error) + PutInMaintenance func(msg string) (err error) + type Group string + type Groups []Group + type JobInfo struct + Timeout time.Time + WorkerUUID WorkerUUID + type ListFilter interface + Match func(req *ReqInfo) bool + type NotFoundError string + func (err NotFoundError) Error() string + type Priority uint8 + const HiPrio + const LoPrio + func (p Priority) String() string + type ReqID uint64 + func (id ReqID) String() string + type ReqInfo struct + Caps Capabilities + Deadline time.Time + ID ReqID + Job *JobInfo + Owner UserInfo + Priority Priority + State ReqState + ValidAfter time.Time + type ReqState string + const CANCEL + const DONE + const FAILED + const INPROGRESS + const INVALID + const TIMEOUT + const WAIT + type Requests interface + AcquireWorker func(reqID ReqID) (AccessInfo, error) + CloseRequest func(reqID ReqID) error + GetRequestInfo func(reqID ReqID) (ReqInfo, error) + ListRequests func(filter ListFilter) ([]ReqInfo, error) + NewRequest func(caps Capabilities, priority Priority, owner UserInfo, validAfter time.Time, ...) (ReqID, error) + ProlongAccess func(reqID ReqID) error + UpdateRequest func(reqInfo *ReqInfo) error + type Superviser interface + Register func(caps Capabilities, dryadAddress string, sshAddress string) (err error) + SetFail func(uuid WorkerUUID, reason string) (err error) + type UserInfo struct + Groups Groups + type WorkerInfo struct + Caps Capabilities + Groups Groups + State WorkerState + WorkerUUID WorkerUUID + type WorkerState string + const BUSY + const FAIL + const IDLE + const MAINTENANCE + const PREPARE + const RUN + type WorkerUUID string + type Workers interface + Deregister func(uuid WorkerUUID) error + GetWorkerInfo func(uuid WorkerUUID) (WorkerInfo, error) + ListWorkers func(groups Groups, caps Capabilities) ([]WorkerInfo, error) + SetGroups func(uuid WorkerUUID, groups Groups) error + SetState func(uuid WorkerUUID, state WorkerState) error