events

package
v0.24.442 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 EdgeEventDispatcher added in v0.24.401

type EdgeEventDispatcher struct {
	// contains filtered or unexported fields
}

func NewEdgeEventDispatcher added in v0.24.401

func NewEdgeEventDispatcher(n *network.Network, dbProvider persistence.DbProvider, stores *persistence.Stores, closeNotify <-chan struct{}) *EdgeEventDispatcher

func (*EdgeEventDispatcher) AddApiSessionEventHandler added in v0.24.401

func (self *EdgeEventDispatcher) AddApiSessionEventHandler(handler ApiSessionEventHandler)

func (*EdgeEventDispatcher) AddEntityCountEventHandler added in v0.24.401

func (self *EdgeEventDispatcher) AddEntityCountEventHandler(handler EntityCountEventHandler, interval time.Duration, onlyLeaderEvents bool)

func (*EdgeEventDispatcher) AddSessionEventHandler added in v0.24.401

func (self *EdgeEventDispatcher) AddSessionEventHandler(handler SessionEventHandler)

func (*EdgeEventDispatcher) InitializeEvents added in v0.24.401

func (self *EdgeEventDispatcher) InitializeEvents()

func (*EdgeEventDispatcher) RemoveApiSessionEventHandler added in v0.24.401

func (self *EdgeEventDispatcher) RemoveApiSessionEventHandler(handler ApiSessionEventHandler)

func (*EdgeEventDispatcher) RemoveEntityCountEventHandler added in v0.24.401

func (self *EdgeEventDispatcher) RemoveEntityCountEventHandler(handler EntityCountEventHandler)

func (*EdgeEventDispatcher) RemoveSessionEventHandler added in v0.24.401

func (self *EdgeEventDispatcher) 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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL