Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct { Header *Header `json:"header"` Message interface{} `json:"message"` }
Envelope is the data structure that holds the information to be published by the Broker
type Event ¶
type Event interface { EventSource() EventSource EventType() EventType }
Event is the contract for events handled by EventHandlers
type EventMessage ¶
type EventMessage struct {
Body interface{}
}
EventMessage is the data structure for messages that are resulting of reconcile events.
func (*EventMessage) Content ¶
func (e *EventMessage) Content() interface{}
Content extracts the body of the EventMessage
type EventSource ¶
type EventSource string
var ( EventSourceOnAdd EventSource = "OnAdd" EventSourceOnUpdate EventSource = "OnUpdate" EventSourceOnDelete EventSource = "OnDelete" )
type GameServerEvent ¶
type GameServerEvent struct { Source EventSource Type GameServerEventType Message }
GameServerEvent is the data structure for reconcile events associated with Agones GameServers It holds the event source (OnAdd, OnUpdate, OnDelete) and the event type (Added, Updated, Deleted).
func GameServerAdded ¶
func GameServerAdded(message Message) *GameServerEvent
GameServerAdded is the data structure for reconcile events of type Add
func GameServerDeleted ¶
func GameServerDeleted(message Message) *GameServerEvent
GameServerDeleted is the data structure for reconcile events of type Delete
func GameServerUpdated ¶
func GameServerUpdated(message Message) *GameServerEvent
GameServerUpdates is the data structure for reconcile events of type Update
func (*GameServerEvent) EventSource ¶
func (t *GameServerEvent) EventSource() EventSource
EventSource return the event source that generated the event. For example: OnAdd, OnUpdate, OnDelete
func (*GameServerEvent) EventType ¶
func (t *GameServerEvent) EventType() EventType
EventType returns the type of the reconcile event for a GameServer. For example: Added, Updated, Deleted
type GameServerEventType ¶
type GameServerEventType string
var ( GameServerEventAdded GameServerEventType = "gameserver.events.added" GameServerEventUpdated GameServerEventType = "gameserver.events.updated" GameServerEventDeleted GameServerEventType = "gameserver.events.deleted" )
func (GameServerEventType) String ¶
func (t GameServerEventType) String() string
String is a helper method that returns the string version of a GameServerType