Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGoFeatureFlagClient ¶
func NewNotifierRelayProxy ¶
func NewNotifierRelayProxy(websocketService WebsocketService) notifier.Notifier
Types ¶
type Monitoring ¶
type Monitoring interface {
Health() model.HealthResponse
Info() model.InfoResponse
}
Monitoring is the interface of the monitoring service
func NewMonitoring ¶
func NewMonitoring(goFF *ffclient.GoFeatureFlag) Monitoring
NewMonitoring creates a new implementation of Monitoring
type Services ¶
type Services struct {
// MonitoringService is the service in charge of managing the monitoring
MonitoringService Monitoring
// WebsocketBroadcasterService is the service in charge to manage the websockets in the relay proxy
WebsocketService WebsocketService
// GOFeatureFlagService is the GO Feature Flag goff we are using in the relay proxy.
GOFeatureFlagService *goff.GoFeatureFlag
}
type WebsocketConn ¶
type WebsocketConn interface {
WriteJSON(v interface{}) error
}
WebsocketConn is an interface to be able to mock websocket.Conn
type WebsocketService ¶
type WebsocketService interface {
// Register is adding the connection to the list of open connection.
Register(c WebsocketConn)
// Deregister is removing the connection from the list of open connection.
Deregister(c WebsocketConn)
// BroadcastFlagChanges is sending the diff cache struct to the client.
BroadcastFlagChanges(diff notifier.DiffCache)
// Close deregister all open connections.
Close()
}
WebsocketService is the service interface that handle the websocket connections This service is able to broadcast a notification to all the open websockets
func NewWebsocketService ¶
func NewWebsocketService() WebsocketService
NewWebsocketService is a constructor to create a new WebsocketService.
Click to show internal directories.
Click to hide internal directories.