Documentation ¶
Index ¶
- func AsStreamWriter(id int, receiver chan *Message) fasthttp.StreamWriter
- func CloseReceiver(id int)
- func NewReceiver(topics ...Topic) (int, chan *Message)
- func SendEvent(topic Topic, data any)
- type ElectionEndedData
- type Message
- type Topic
- type UserDeletedData
- type UserElectionStandData
- type UserElectionWithdrawData
- type UserRestrictedData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsStreamWriter ¶
func AsStreamWriter(id int, receiver chan *Message) fasthttp.StreamWriter
func CloseReceiver ¶
func CloseReceiver(id int)
func NewReceiver ¶
Types ¶
type ElectionEndedData ¶
type Topic ¶
type Topic string
const ( TopicElectionStarted Topic = "election-start" TopicElectionEnded Topic = "election-end" TopicVoteReceived Topic = "vote-received" TopicUserElectionStand Topic = "user-stand" TopicUserElectionWithdraw Topic = "user-withdraw" TopicUserRestricted Topic = "user-restrict" TopicUserDeleted Topic = "user-delete" )
type UserDeletedData ¶
type UserElectionStandData ¶
type UserRestrictedData ¶
Click to show internal directories.
Click to hide internal directories.