Documentation
¶
Overview ¶
nolint: lll
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FakeMetricsController ¶ added in v1.5.0
func FakeMetricsController(_ echo.Context)
FakeMetricsController is a fake entry point for swagger documentation
@Summary Prometheus endpoint @Tags Monitoring @Description This endpoint is providing metrics about the relay proxy in the prometheus format. @Produce plain @Success 200 {object} string @Router /metrics [get]
func FakePprofController ¶ added in v1.37.0
func FakePprofController(_ echo.Context)
FakePprofController is a fake endpoint for swagger documentation of pprof endpoint
@Summary pprof endpoint @Tags Profiling @Description This endpoint is provided by the echo pprof middleware. @Description To know more please check this blogpost from the GO team https://go.dev/blog/pprof. @Description Visit the page /debug/pprof/ to see the available endpoints, all endpoint are not in the swagger documentation because they are standard pprof endpoints. @Description This endpoint is only available in debug mode. @Produce plain @Success 200 {object} string @Router /debug/pprof/ [get]
Types ¶
type AllFlags ¶
type AllFlags struct {
// flags is the list of flag for the user.
Flags map[string]FlagState `json:"flags"`
// `true` if something went wrong in the relay proxy (flag does not exists, ...) and we serve the defaultValue.
Valid bool `json:"valid" example:"false"`
}
AllFlags model info @Description AllFlags contains the full list of all the flags available for the user
type EvalFlagDoc ¶
type EvalFlagDoc struct {
// `true` if the event was tracked by the relay proxy.
TrackEvents bool `json:"trackEvents" example:"true"`
// The variation used to give you this value.
VariationType string `json:"variationType" example:"variation-A"`
// `true` if something went wrong in the relay proxy (flag does not exists, ...) and we serve the defaultValue.
Failed bool `json:"failed" example:"false"`
// The version of the flag used.
Version string `json:"version" example:"1.0"`
// reason why we have returned this value.
Reason string `json:"reason" example:"TARGETING_MATCH"`
// Code of the error returned by the server.
ErrorCode string `json:"errorCode" example:""`
// The flag value for this user.
Value interface{} `json:"value"`
// Metadata is a field containing information about your flag such as an issue tracker link, a description, etc ...
Metadata *map[string]interface{} `json:"metadata" yaml:"metadata,omitempty" toml:"metadata,omitempty"`
}
EvalFlagDoc is the documentation struct for the Swagger doc.
type FlagState ¶
type FlagState struct {
// Value is the flag value, it can be any JSON types.
Value interface{} `json:"value"`
// Timestamp is the time when the flag was evaluated.
Timestamp int64 `json:"timestamp" example:"1652113076"`
// VariationType is the name of the variation used to have the flag value.
VariationType string `json:"variationType" example:"variation-A"`
// TrackEvents this flag is trackable.
TrackEvents bool `json:"trackEvents" example:"false"`
Failed bool `json:"-"`
}
FlagState represents the state of an individual feature flag, with regard to a specific user, when it was called.
type HTTPErrorDoc ¶
type HTTPErrorDoc struct {
// Message of your error
Message string `json:"message" example:"An error occurred"`
}