From ae13d0c4ed6e4dee4a956baedd81e6849ee5f7a2 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 8 Mar 2025 15:17:27 +0900 Subject: [PATCH] starting simple messaging code --- Makefile | 1 + bulletin.go | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 bulletin.go diff --git a/Makefile b/Makefile index 1c885fd..c153978 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ NAME=hodu VERSION=1.0.0 SRCS=\ + bulletin.go \ client.go \ client-ctl.go \ client-metrics.go \ diff --git a/bulletin.go b/bulletin.go new file mode 100644 index 0000000..4138453 --- /dev/null +++ b/bulletin.go @@ -0,0 +1,21 @@ +package hodu + +type Message struct { +} + +type Subscriber struct { +} + +type Bulletin struct { +} + +func NewBulletin() *Bulletin { + return &Bulletin{} +} + +func (b *Bulletin) Subscribe(topic string) { + +} + +func (b *Bulletin) Publish(topic string, data interface{}) { +}