diff --git a/api/messages.go b/api/results.go similarity index 96% rename from api/messages.go rename to api/results.go index a44ca4ce0bbc90ebe8cc1b40f586b9cf938ab95b..9cd07a081f193eca82706ce126994a3eb9a2ca4e 100644 --- a/api/messages.go +++ b/api/results.go @@ -7,6 +7,7 @@ package api import ( + "fmt" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/globals" "gitlab.com/elixxir/client/network/gateway" @@ -28,6 +29,19 @@ const ( Succeeded ) +func (rr RoundResult) String() string { + switch rr { + case TimeOut: + return "TimeOut" + case Failed: + return "Failed" + case Succeeded: + return "Succeeded" + default: + return fmt.Sprintf("UNKNOWN RESULT: %d", RR) + } +} + // Callback interface which reports the requested rounds. // Designed such that the caller may decide how much detail they need. // allRoundsSucceeded: diff --git a/api/messages_test.go b/api/results_test.go similarity index 100% rename from api/messages_test.go rename to api/results_test.go