Documentation ¶
Overview ¶
Package events provides publisher-subscriber interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataAllowlist ¶
type DataAuthorization ¶
type DataAuthorization struct { DurationMs int EventTrigger TypeEventTrigger EventStatus TypeEventStatus EventType TypeLoginType }
type DataConnect ¶
type DataConnect struct { IsMeshnetPeer bool APIHostname string Auto bool ThreatProtectionLite bool Protocol config.Protocol ResponseServersCount int ResponseTime int DurationMs int ServerFromAPI bool EventStatus TypeEventStatus TargetServerSelection string Technology config.Technology TargetServerCity string TargetServerCountry string TargetServerDomain string TargetServerGroup string TargetServerIP string TargetServerPick string TargetServerPickerResponse string TargetServerName string Error error }
type DataDisconnect ¶
type DataDisconnect struct { Protocol config.Protocol ServerFromAPI bool EventStatus TypeEventStatus Technology config.Technology TargetServerSelection string ThreatProtectionLite bool ByUser bool }
type DataRequestAPI ¶
type PublishSubcriber ¶
type PublishSubcriber[T any] interface { Publisher[T] Subscriber[T] }
PublishSubcriber allows both publishing and subscribing to messages of type T.
type Publisher ¶
type Publisher[T any] interface { Publish(message T) }
Publisher allows publishing messages of type T.
type Subscriber ¶
type Subscriber[T any] interface { // Subscribe allows registering multiple handlers for the same message. Subscribe(Handler[T]) }
Subscriber listens to messages of type T.
type TypeEventStatus ¶
type TypeEventStatus int
const ( StatusAttempt TypeEventStatus = iota StatusSuccess StatusFailure StatusCanceled )
type TypeEventTrigger ¶
type TypeEventTrigger int
const ( TriggerApp TypeEventTrigger = iota TriggerUser )
type TypeLoginType ¶
type TypeLoginType int
const ( LoginLogin TypeLoginType = iota // regular login LoginSignUp // login after signup )
Directories ¶
Path | Synopsis |
---|---|
Package MeshUnsetter responsible for unsetting meshnet if got 404 on api request
|
Package MeshUnsetter responsible for unsetting meshnet if got 404 on api request |
Package refresher is responsible for refreshing application state on specific events.
|
Package refresher is responsible for refreshing application state on specific events. |
Package subs is responsible for communication between modules and it facilitates dependency decoupling.
|
Package subs is responsible for communication between modules and it facilitates dependency decoupling. |
Click to show internal directories.
Click to hide internal directories.