Documentation ¶
Index ¶
- Variables
- func RegisterEventFactory(obj runtime.Object, onAdded EventBuilder, onUpdated EventBuilder, ...)
- func ResourceMessageKind(obj runtime.Object) string
- type Envelope
- type Event
- func FleetAdded(message Message) Event
- func FleetDeleted(message Message) Event
- func FleetUpdated(message Message) Event
- func GameServerAdded(message Message) Event
- func GameServerDeleted(message Message) Event
- func GameServerUpdated(message Message) Event
- func OnAdded(message Message) Event
- func OnDeleted(message Message) Event
- func OnUpdated(message Message) Event
- type EventBuilder
- type EventFactory
- type EventMessage
- type EventSource
- type EventType
- type FleetEvent
- type FleetEventType
- type GameServerEvent
- type GameServerEventType
- type Header
- type Message
Constants ¶
This section is empty.
Variables ¶
var (
EventFactoryRegistry = map[string]*EventFactory{}
)
Functions ¶
func RegisterEventFactory ¶
func RegisterEventFactory(obj runtime.Object, onAdded EventBuilder, onUpdated EventBuilder, onDeleted EventBuilder)
RegisterEventFactory register events builders for a particular resource type.
func ResourceMessageKind ¶
ResourceMessageKind returns the type of the object that is the content of the message
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
func FleetAdded ¶
FleetAdded is the data structure for reconcile events of type Add
func FleetDeleted ¶
FleetDeleted is the data structure for reconcile events of type Delete
func FleetUpdated ¶
FleetUpdated is the data structure for reconcile events of type Update
func GameServerAdded ¶
GameServerAdded is the data structure for reconcile events of type Add
func GameServerDeleted ¶
GameServerDeleted is the data structure for reconcile events of type Delete
func GameServerUpdated ¶
GameServerUpdates is the data structure for reconcile events of type Update
type EventBuilder ¶
type EventFactory ¶
type EventFactory struct { OnAdded EventBuilder OnUpdated EventBuilder OnDeleted EventBuilder }
type EventMessage ¶
type EventMessage struct {
Body interface{} `json:"body"`
}
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" )
func (EventSource) String ¶
func (s EventSource) String() string
String returns the string representation of a EventType
type FleetEvent ¶
type FleetEvent struct { Source EventSource `json:"source"` Type FleetEventType `json:"type"` Message `json:"message"` }
FleetEvent is the data structure for reconcile events associated with Agones Fleets It holds the event source (OnAdd, OnUpdate, OnDelete) and the event type (Added, Updated, Deleted).
func (*FleetEvent) EventSource ¶
func (t *FleetEvent) EventSource() EventSource
EventSource return the event source that generated the event. For example: OnAdd, OnUpdate, OnDelete
func (*FleetEvent) EventType ¶
func (t *FleetEvent) EventType() EventType
EventType returns the type of the reconcile event for a Fleet. For example: Added, Updated, Deleted
type FleetEventType ¶
type FleetEventType string
var ( FleetEventAdded FleetEventType = "fleet.events.added" FleetEventUpdated FleetEventType = "fleet.events.updated" FleetEventDeleted FleetEventType = "fleet.events.deleted" )
func (FleetEventType) String ¶
func (t FleetEventType) String() string
String is a helper method that returns the string version of a FleetEventType
type GameServerEvent ¶
type GameServerEvent struct { Source EventSource `json:"source"` Type GameServerEventType `json:"type"` Message `json:"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 (*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 GameServerEventType