events

package
v0.24.337 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 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 added in v0.20.122

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

func (event *ApiSessionEvent) String() string

type ApiSessionEventHandler added in v0.20.122

type ApiSessionEventHandler interface {
	AcceptApiSessionEvent(event *ApiSessionEvent)
}

type ApiSessionEventHandlerWrapper added in v0.24.95

type ApiSessionEventHandlerWrapper interface {
	ApiSessionEventHandler
	IsWrapping(value ApiSessionEventHandler) bool
}

type Dispatcher added in v0.23.0

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

func NewDispatcher added in v0.23.0

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

func (*Dispatcher) AddApiSessionEventHandler added in v0.23.0

func (self *Dispatcher) AddApiSessionEventHandler(handler ApiSessionEventHandler)

func (*Dispatcher) AddEntityCountEventHandler added in v0.24.84

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

func (*Dispatcher) AddSessionEventHandler added in v0.23.0

func (self *Dispatcher) AddSessionEventHandler(handler SessionEventHandler)

func (*Dispatcher) InitializeEvents added in v0.23.0

func (self *Dispatcher) InitializeEvents()

func (*Dispatcher) RemoveApiSessionEventHandler added in v0.23.0

func (self *Dispatcher) RemoveApiSessionEventHandler(handler ApiSessionEventHandler)

func (*Dispatcher) RemoveEntityCountEventHandler added in v0.24.84

func (self *Dispatcher) RemoveEntityCountEventHandler(handler EntityCountEventHandler)

func (*Dispatcher) RemoveSessionEventHandler added in v0.23.0

func (self *Dispatcher) RemoveSessionEventHandler(handler SessionEventHandler)

type EdgeJsonFormatter added in v0.16.43

type EdgeJsonFormatter struct {
	events.JsonFormatter
}

func (*EdgeJsonFormatter) AcceptApiSessionEvent added in v0.20.122

func (formatter *EdgeJsonFormatter) AcceptApiSessionEvent(event *ApiSessionEvent)

func (*EdgeJsonFormatter) AcceptEntityCountEvent added in v0.20.28

func (formatter *EdgeJsonFormatter) AcceptEntityCountEvent(event *EntityCountEvent)

func (*EdgeJsonFormatter) AcceptSessionEvent added in v0.20.28

func (formatter *EdgeJsonFormatter) AcceptSessionEvent(event *SessionEvent)

type EntityCountEvent added in v0.20.28

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

func (event *EntityCountEvent) String() string

type EntityCountEventHandler added in v0.20.28

type EntityCountEventHandler interface {
	AcceptEntityCountEvent(event *EntityCountEvent)
}

type JsonApiSessionEvent added in v0.20.122

type JsonApiSessionEvent ApiSessionEvent

func (*JsonApiSessionEvent) Format added in v0.24.84

func (event *JsonApiSessionEvent) Format() ([]byte, error)

func (*JsonApiSessionEvent) GetEventType added in v0.24.84

func (event *JsonApiSessionEvent) GetEventType() string

type JsonEntityCountEvent added in v0.20.28

type JsonEntityCountEvent EntityCountEvent

func (*JsonEntityCountEvent) Format added in v0.24.84

func (event *JsonEntityCountEvent) Format() ([]byte, error)

func (*JsonEntityCountEvent) GetEventType added in v0.24.84

func (event *JsonEntityCountEvent) GetEventType() string

type JsonSessionEvent added in v0.20.28

type JsonSessionEvent SessionEvent

func (*JsonSessionEvent) Format added in v0.24.84

func (event *JsonSessionEvent) Format() ([]byte, error)

func (*JsonSessionEvent) GetEventType added in v0.24.84

func (event *JsonSessionEvent) GetEventType() string

type SessionEvent added in v0.20.28

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

func (event *SessionEvent) String() string

type SessionEventHandler

type SessionEventHandler interface {
	AcceptSessionEvent(event *SessionEvent)
}

type SessionEventHandlerWrapper added in v0.24.95

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