diff options
author | Özgür Kesim <oec@codeblau.de> | 2024-11-11 18:05:25 +0100 |
---|---|---|
committer | Özgür Kesim <oec@codeblau.de> | 2024-11-11 18:05:25 +0100 |
commit | 7813100e5429ca486d6310f8a04d7a0d11325f2e (patch) | |
tree | d7bd0aad9a1e2557aafd129c285c132bae9dcd12 /auction.go | |
parent | 08ca372b0a95025a5ab49ccb4ee51af1aa1185ff (diff) |
refactor struct names
Diffstat (limited to 'auction.go')
-rw-r--r-- | auction.go | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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( |