Documentation ¶
Overview ¶
Package bus is the message bus. This package listens on various NATS channels for requests and publishes back responses to the same, or other channels. Responsible for talking to the liwords-socket server.
Index ¶
Constants ¶
View Source
const ( MaxMessageLength = 500 AdjudicateInterval = 10 * time.Second GamesCounterInterval = 60 * time.Minute SeeksExpireInterval = 10 * time.Minute // Cancel a game if it hasn't started after this much time. CancelAfter = 60 * time.Second )
View Source
const (
BotRequestID = "bot-request"
)
View Source
const (
TournamentReadyExpire = 3600
)
Variables ¶
View Source
var BootedReceiversMax = 5
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus is the struct; it should contain all the stores to verify messages, etc.
func (*Bus) ProcessMessages ¶
ProcessMessages is very similar to the PubsubProcess in liwords-socket, but that's because they do similar things.
func (*Bus) TournamentEventChannel ¶ added in v0.1.3
func (b *Bus) TournamentEventChannel() chan *entity.EventWrapper
type Stores ¶ added in v0.1.3
type Stores struct { UserStore user.Store GameStore gameplay.GameStore SoughtGameStore gameplay.SoughtGameStore PresenceStore user.PresenceStore ChatStore user.ChatStore ListStatStore stats.ListStatStore NotorietyStore mod.NotorietyStore TournamentStore tournament.TournamentStore ConfigStore config.ConfigStore SessionStore sessions.SessionStore }
Click to show internal directories.
Click to hide internal directories.