service

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 41 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGoFeatureFlagClient

func NewGoFeatureFlagClient(
	proxyConf *config.Config,
	logger *zap.Logger,
	notifiers []notifier.Notifier,
) (*ffclient.GoFeatureFlag, error)

func NewNotifierWebsocket added in v1.17.0

func NewNotifierWebsocket(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 added in v1.12.0

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
	// Metrics is the service containing all the prometheus metrics
	Metrics metric.Metrics
}

type WebsocketConn added in v1.12.0

type WebsocketConn interface {
	WriteJSON(v interface{}) error
}

WebsocketConn is an interface to be able to mock websocket.Conn

type WebsocketService added in v1.12.0

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 added in v1.12.0

func NewWebsocketService() WebsocketService

NewWebsocketService is a constructor to create a new WebsocketService.

Jump to

Keyboard shortcuts

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