package models import "container/list" type EventType int const ( // EventTypeSubscribe event type for the bus indicating a new subscription. // Data is a (chan Sub) to send the new subscription EventTypeSubscribe EventType = iota // EventTypeUnsubscribe event type for the bus indicating to remove a subscription. // Data is the Sub type EventTypeUnsubscribe // EventSiteBuildingStart indicates that the site has started being built. Data = site EventSiteBuildingStart = 2 // EventSiteBuildingDone indicates that the site has finish building. Data = site EventSiteBuildingDone = 3 ) type Event struct { Type EventType Data any } type Sub struct { C chan Event Elem *list.Element }