aboutsummaryrefslogtreecommitdiff
path: root/auction.go
diff options
context:
space:
mode:
Diffstat (limited to 'auction.go')
-rw-r--r--auction.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/auction.go b/auction.go
index 9dd7da5..053acdd 100644
--- a/auction.go
+++ b/auction.go
@@ -123,15 +123,17 @@ type auction struct {
log *slog.Logger
}
+// Start must be called by the bidder or observer,
+// when they receive a start signal from the dashboard
func (a *auction) Start() error {
- return errors.New("Start not implemented")
+ return fmt.Errorf("auction.Start not fully implemented")
}
func (a *auction) Cancel() error {
return errors.New("Cancel not implemented")
}
-// Message is called by the Bidder or Observer
+// Message is called by the bidder's or observer's code
// whenever a message came in for the auction via the dashboard
// or other means of communication.
func (a *auction) Message(msg Message) error {
@@ -142,9 +144,9 @@ const MAXBITLENGTH = 64
// Bidder is the interface that the Auction engine uses to interact
type Bidder interface {
- Broadcast([]byte) error
+ Broadcast(Message) error
Result(Result)
- Start()
+ Start() error
}
func Join(