controller

package
v1.46.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: MIT Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Handler(c echo.Context) error
}

Controller is the interface used by all controller struct

func NewAPIFlagChange added in v1.30.0

func NewAPIFlagChange(flagsetManager service.FlagsetManager, metrics metric.Metrics) Controller

func NewAPIFlagConfiguration added in v1.45.0

func NewAPIFlagConfiguration(flagsetManager service.FlagsetManager, metrics metric.Metrics) Controller

func NewAllFlags

func NewAllFlags(flagsetManager service.FlagsetManager, metrics metric.Metrics) Controller

func NewCollectEvalData added in v1.7.0

func NewCollectEvalData(
	flagsetManager service.FlagsetManager,
	metrics metric.Metrics,
	logger *zap.Logger,
) Controller

NewCollectEvalData initialize the controller for the /data/collector endpoint

func NewFlagEval

func NewFlagEval(flagsetMngr service.FlagsetManager, metrics metric.Metrics) Controller

func NewForceFlagsRefresh added in v1.28.0

func NewForceFlagsRefresh(flagsetManager service.FlagsetManager, metrics metric.Metrics) Controller

NewForceFlagsRefresh initialize the controller for the /data/collector endpoint

func NewHealth

func NewHealth(monitoring service.Monitoring) Controller

NewHealth is a constructor to create a new controller for the health method

func NewInfo

func NewInfo(monitoring service.Monitoring) Controller

func NewWsFlagChange added in v1.12.0

func NewWsFlagChange(websocketService service.WebsocketService, logger *zap.Logger) Controller

NewWsFlagChange is the constructor to create a new controller to handle websocket request to be notified about flag changes.

type FlagChangeAPICtrl added in v1.30.0

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

func (*FlagChangeAPICtrl) Handler added in v1.30.0

func (h *FlagChangeAPICtrl) Handler(c echo.Context) error

Handler is the endpoint to poll if you want to know if there is a configuration change in the flags @Summary Endpoint to poll if you want to know if there is a configuration change in the flags @Tags GO Feature Flag Evaluation API @Description Making a **GET** request to the URL `/v1/flag/change` will give you the hash of the current @Description configuration, you can use this hash to know if the configuration has changed. @Security ApiKeyAuth @Produce json @Accept json @Param If-None-Match header string false "The request will be processed only if ETag doesn't match." @Success 200 {object} FlagChangeResponse "Success" @Success 304 {string} string "Etag: \"117-0193435c612c50d93b798619d9464856263dbf9f\"" @Failure 500 {object} modeldocs.HTTPErrorDoc "Internal server error" @Router /v1/flag/change [get]

type FlagChangeResponse added in v1.30.0

type FlagChangeResponse struct {
	Hash  uint32            `json:"hash"`
	Flags map[string]uint32 `json:"flags"`
}

type FlagConfigurationAPICtrl added in v1.45.0

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

func (*FlagConfigurationAPICtrl) Handler added in v1.45.0

func (h *FlagConfigurationAPICtrl) Handler(c echo.Context) error

Handler is the endpoint to poll if you want to get the configuration of the flags. @Summary Endpoint to poll if you want to get the configuration of the flags. @Tags GO Feature Flag Evaluation API @Description Making a **POST** request to the URL `/v1/flag/configuration` will give you the list of @Description the flags to use them for local evaluation in your provider. @Security ApiKeyAuth @Produce json @Accept json @Param data body FlagConfigurationRequest false "List of flags to get the configuration from." @Param If-None-Match header string false "The request will be processed only if ETag doesn't match." @Success 200 {object} FlagConfigurationResponse "Success" @Success 304 {string} string "Etag: \"117-0193435c612c50d93b798619d9464856263dbf9f\"" @Failure 500 {object} modeldocs.HTTPErrorDoc "Internal server error" @Router /v1/flag/configuration [post]

type FlagConfigurationError added in v1.45.0

type FlagConfigurationError = string
const (
	FlagConfigErrorInvalidRequest  FlagConfigurationError = "INVALID_REQUEST"
	FlagConfigErrorRetrievingFlags FlagConfigurationError = "RETRIEVING_FLAGS_ERROR"
)

type FlagConfigurationRequest added in v1.45.0

type FlagConfigurationRequest struct {
	Flags []string `json:"flags"`
}

type FlagConfigurationResponse added in v1.45.0

type FlagConfigurationResponse struct {
	Flags                       map[string]flag.Flag   `json:"flags,omitempty"`
	EvaluationContextEnrichment map[string]interface{} `json:"evaluationContextEnrichment,omitempty"`
	ErrorCode                   string                 `json:"errorCode,omitempty"`
	ErrorDetails                string                 `json:"errorDetails,omitempty"`
}

type OFREPController added in v1.24.0

type OFREPController interface {
	Handler(c echo.Context) error
	OFREPHandler(c echo.Context) error
}

Jump to

Keyboard shortcuts

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