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 DataConnect ¶
type DataConnect struct { IsMeshnetPeer bool APIHostname string Auto bool ThreatProtectionLite bool Protocol config.Protocol ResponseServersCount int ResponseTime int ServerFromAPI bool Type TypeConnect TargetServerSelection string Technology config.Technology TargetServerCity string TargetServerCountry string TargetServerDomain string TargetServerGroup string TargetServerIP string TargetServerPick string TargetServerPickerResponse string TargetServerName string }
type DataDisconnect ¶
type DataDisconnect struct { Protocol config.Protocol ServerFromAPI bool Type TypeDisconnect Technology config.Technology TargetServerSelection string ThreatProtectionLite 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 ServerRating ¶
ServerRating last used server rating info
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 TypeConnect ¶
type TypeConnect int
const ( ConnectAttempt TypeConnect = iota ConnectSuccess ConnectFailure )
type TypeDisconnect ¶
type TypeDisconnect int
const ( DisconnectAttempt TypeDisconnect = iota DisconnectSuccess DisconnectFailure )
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.