aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖzgür Kesim <oec@codeblau.de>2024-04-07 14:11:48 +0200
committerÖzgür Kesim <oec@codeblau.de>2024-04-07 14:11:48 +0200
commit8bbacb9b79fad0fbb16db28019bee2533330b69f (patch)
treeda4d90d9f59d30572dcbc3a9eb39a56732f471e5
parent438b69e74b416918ef855c4a28d90779ea1e455c (diff)
auction: add Auction interface
-rw-r--r--auction.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/auction.go b/auction.go
index aeff7b3..78b9af6 100644
--- a/auction.go
+++ b/auction.go
@@ -35,8 +35,14 @@ type SignedDesciption struct {
SellerSignature string
}
+// Auction is the simple interface for the engine
+type Auction interface {
+ Join(bidder Bidder)
+ Received(msg []byte) error
+}
+
// Bidder is the interface that the Auction engine uses to communicate
type Bidder interface {
Result()
- Send(msg []byte, sig []byte)
+ Send(msg []byte, sig []byte) error
}