Documentation ¶
Index ¶
- Constants
- type ApiSessionEvent
- type ApiSessionEventHandler
- type ApiSessionEventHandlerWrapper
- type Dispatcher
- func (self *Dispatcher) AddApiSessionEventHandler(handler ApiSessionEventHandler)
- func (self *Dispatcher) AddEntityCountEventHandler(handler EntityCountEventHandler, interval time.Duration, onlyLeaderEvents bool)
- func (self *Dispatcher) AddSessionEventHandler(handler SessionEventHandler)
- func (self *Dispatcher) InitializeEvents()
- func (self *Dispatcher) RemoveApiSessionEventHandler(handler ApiSessionEventHandler)
- func (self *Dispatcher) RemoveEntityCountEventHandler(handler EntityCountEventHandler)
- func (self *Dispatcher) RemoveSessionEventHandler(handler SessionEventHandler)
- type EdgeJsonFormatter
- type EntityCountEvent
- type EntityCountEventHandler
- type JsonApiSessionEvent
- type JsonEntityCountEvent
- type JsonSessionEvent
- type SessionEvent
- type SessionEventHandler
- type SessionEventHandlerWrapper
Constants ¶
View Source
const ApiSessionEventNS = "edge.apiSessions"
View Source
const ApiSessionEventTypeCreated = "created"
View Source
const ApiSessionEventTypeDeleted = "deleted"
View Source
const EntityCountEventNS = "edge.entityCounts"
View Source
const SessionEventNS = "edge.sessions"
View Source
const SessionEventTypeCreated = "created"
View Source
const SessionEventTypeDeleted = "deleted"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiSessionEvent ¶
type ApiSessionEvent struct { Namespace string `json:"namespace"` EventType string `json:"event_type"` Id string `json:"id"` Timestamp time.Time `json:"timestamp"` Token string `json:"token"` IdentityId string `json:"identity_id"` IpAddress string `json:"ip_address"` }
func (*ApiSessionEvent) String ¶
func (event *ApiSessionEvent) String() string
type ApiSessionEventHandler ¶
type ApiSessionEventHandler interface {
AcceptApiSessionEvent(event *ApiSessionEvent)
}
type ApiSessionEventHandlerWrapper ¶
type ApiSessionEventHandlerWrapper interface { ApiSessionEventHandler IsWrapping(value ApiSessionEventHandler) bool }
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(n *network.Network, dbProvider persistence.DbProvider, stores *persistence.Stores, closeNotify <-chan struct{}) *Dispatcher
func (*Dispatcher) AddApiSessionEventHandler ¶
func (self *Dispatcher) AddApiSessionEventHandler(handler ApiSessionEventHandler)
func (*Dispatcher) AddEntityCountEventHandler ¶
func (self *Dispatcher) AddEntityCountEventHandler(handler EntityCountEventHandler, interval time.Duration, onlyLeaderEvents bool)
func (*Dispatcher) AddSessionEventHandler ¶
func (self *Dispatcher) AddSessionEventHandler(handler SessionEventHandler)
func (*Dispatcher) InitializeEvents ¶
func (self *Dispatcher) InitializeEvents()
func (*Dispatcher) RemoveApiSessionEventHandler ¶
func (self *Dispatcher) RemoveApiSessionEventHandler(handler ApiSessionEventHandler)
func (*Dispatcher) RemoveEntityCountEventHandler ¶
func (self *Dispatcher) RemoveEntityCountEventHandler(handler EntityCountEventHandler)
func (*Dispatcher) RemoveSessionEventHandler ¶
func (self *Dispatcher) RemoveSessionEventHandler(handler SessionEventHandler)
type EdgeJsonFormatter ¶
type EdgeJsonFormatter struct {
events.JsonFormatter
}
func (*EdgeJsonFormatter) AcceptApiSessionEvent ¶
func (formatter *EdgeJsonFormatter) AcceptApiSessionEvent(event *ApiSessionEvent)
func (*EdgeJsonFormatter) AcceptEntityCountEvent ¶
func (formatter *EdgeJsonFormatter) AcceptEntityCountEvent(event *EntityCountEvent)
func (*EdgeJsonFormatter) AcceptSessionEvent ¶
func (formatter *EdgeJsonFormatter) AcceptSessionEvent(event *SessionEvent)
type EntityCountEvent ¶
type EntityCountEvent struct { Namespace string `json:"namespace"` Timestamp time.Time `json:"timestamp"` Counts map[string]int64 `json:"counts"` Error string `json:"error"` }
func (*EntityCountEvent) String ¶
func (event *EntityCountEvent) String() string
type EntityCountEventHandler ¶
type EntityCountEventHandler interface {
AcceptEntityCountEvent(event *EntityCountEvent)
}
type JsonApiSessionEvent ¶
type JsonApiSessionEvent ApiSessionEvent
func (*JsonApiSessionEvent) Format ¶
func (event *JsonApiSessionEvent) Format() ([]byte, error)
func (*JsonApiSessionEvent) GetEventType ¶
func (event *JsonApiSessionEvent) GetEventType() string
type JsonEntityCountEvent ¶
type JsonEntityCountEvent EntityCountEvent
func (*JsonEntityCountEvent) Format ¶
func (event *JsonEntityCountEvent) Format() ([]byte, error)
func (*JsonEntityCountEvent) GetEventType ¶
func (event *JsonEntityCountEvent) GetEventType() string
type JsonSessionEvent ¶
type JsonSessionEvent SessionEvent
func (*JsonSessionEvent) Format ¶
func (event *JsonSessionEvent) Format() ([]byte, error)
func (*JsonSessionEvent) GetEventType ¶
func (event *JsonSessionEvent) GetEventType() string
type SessionEvent ¶
type SessionEvent struct { Namespace string `json:"namespace"` EventType string `json:"event_type"` SessionType string `json:"session_type"` Id string `json:"id"` Timestamp time.Time `json:"timestamp"` Token string `json:"token"` ApiSessionId string `json:"api_session_id"` IdentityId string `json:"identity_id"` ServiceId string `json:"service_id"` }
func (*SessionEvent) String ¶
func (event *SessionEvent) String() string
type SessionEventHandler ¶
type SessionEventHandler interface {
AcceptSessionEvent(event *SessionEvent)
}
type SessionEventHandlerWrapper ¶
type SessionEventHandlerWrapper interface { SessionEventHandler IsWrapping(value SessionEventHandler) bool }
Click to show internal directories.
Click to hide internal directories.