summaryrefslogtreecommitdiff
path: root/boruta.go
diff options
context:
space:
mode:
authorMaciej Wereski <m.wereski@partner.samsung.com>2018-07-03 12:41:27 +0200
committerMaciej Wereski <m.wereski@partner.samsung.com>2018-07-11 16:29:42 +0200
commit6d7b809ccd8188e3276bac50da65b2b1a2f18fb2 (patch)
tree0e0c44da3e4f07a0bd2fadf5f0052931f82c8516 /boruta.go
parent407f05d57259ee9d7b0613efeda333206336f6fa (diff)
downloadboruta-6d7b809ccd8188e3276bac50da65b2b1a2f18fb2.tar.gz
boruta-6d7b809ccd8188e3276bac50da65b2b1a2f18fb2.tar.bz2
boruta-6d7b809ccd8188e3276bac50da65b2b1a2f18fb2.zip
Make ReqID and Priority types implement Stringeruidocker
Change-Id: I3b8e271e38f8b13fa43ded590e1f31c09922bf5d Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
Diffstat (limited to 'boruta.go')
-rw-r--r--boruta.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/boruta.go b/boruta.go
index 438aa36..19bfee8 100644
--- a/boruta.go
+++ b/boruta.go
@@ -27,6 +27,7 @@ package boruta
import (
"crypto/rsa"
"net"
+ "strconv"
"time"
)
@@ -78,9 +79,21 @@ func (caps Capabilities) GetWorkerUUID() WorkerUUID {
// ReqID refers to the Request created by the User.
type ReqID uint64
+// String returns string representation of ReqID. This is implementation of
+// fmt.Stringer interface.
+func (id ReqID) String() string {
+ return strconv.FormatUint(uint64(id), 10)
+}
+
// Priority is the importance of the Request. Lower - more important.
type Priority uint8
+// String returns string representation of Priority. This is implementation of
+// fmt.Stringer interface.
+func (p Priority) String() string {
+ return strconv.FormatUint(uint64(p), 10)
+}
+
const (
// HiPrio - most important priority (minimum value).
HiPrio Priority = 1