Documentation ¶
Index ¶
- func ErrorHandler(logger *zap.Logger) runtime.ErrorHandlerFunc
- type Bridge
- type EvaluationBridgeInput
- type EvaluationBridgeOutput
- type MockBridge
- type Server
- func (s *Server) EvaluateBulk(ctx context.Context, r *ofrep.EvaluateBulkRequest) (*ofrep.BulkEvaluationResponse, error)
- func (s *Server) EvaluateFlag(ctx context.Context, r *ofrep.EvaluateFlagRequest) (*ofrep.EvaluatedFlag, error)
- func (s *Server) GetProviderConfiguration(_ context.Context, _ *ofrep.GetProviderConfigurationRequest) (*ofrep.GetProviderConfigurationResponse, error)
- func (s *Server) RegisterGRPC(server *grpc.Server)
- func (s *Server) SkipsAuthorization(ctx context.Context) bool
- type Storer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶ added in v1.48.0
func ErrorHandler(logger *zap.Logger) runtime.ErrorHandlerFunc
Types ¶
type Bridge ¶ added in v1.47.0
type Bridge interface { // OFREPFlagEvaluation evaluates a single flag. OFREPFlagEvaluation(ctx context.Context, input EvaluationBridgeInput) (EvaluationBridgeOutput, error) }
Bridge is the interface between the OFREP specification to Flipt internals.
type EvaluationBridgeInput ¶ added in v1.47.0
type EvaluationBridgeInput struct { FlagKey string NamespaceKey string EntityId string Context map[string]string }
EvaluationBridgeInput is the input for the bridge between OFREP specficiation to Flipt internals.
type EvaluationBridgeOutput ¶ added in v1.47.0
type EvaluationBridgeOutput struct { FlagKey string Reason rpcevaluation.EvaluationReason Variant string Value any Metadata map[string]any }
EvaluationBridgeOutput is the input for the bridge between Flipt internals and OFREP specficiation.
type MockBridge ¶ added in v1.48.0
MockBridge is an autogenerated mock type for the Bridge type
func NewMockBridge ¶ added in v1.48.0
func NewMockBridge(t interface { mock.TestingT Cleanup(func()) }) *MockBridge
NewMockBridge creates a new instance of MockBridge. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockBridge) OFREPFlagEvaluation ¶ added in v1.48.0
func (_m *MockBridge) OFREPFlagEvaluation(ctx context.Context, input EvaluationBridgeInput) (EvaluationBridgeOutput, error)
OFREPFlagEvaluation provides a mock function with given fields: ctx, input
type Server ¶
type Server struct { ofrep.UnimplementedOFREPServiceServer // contains filtered or unexported fields }
Server servers the methods used by the OpenFeature Remote Evaluation Protocol. It will be used only with gRPC Gateway as there's no specification for gRPC itself.
func (*Server) EvaluateBulk ¶ added in v1.48.0
func (s *Server) EvaluateBulk(ctx context.Context, r *ofrep.EvaluateBulkRequest) (*ofrep.BulkEvaluationResponse, error)
func (*Server) EvaluateFlag ¶ added in v1.47.0
func (s *Server) EvaluateFlag(ctx context.Context, r *ofrep.EvaluateFlagRequest) (*ofrep.EvaluatedFlag, error)
func (*Server) GetProviderConfiguration ¶
func (s *Server) GetProviderConfiguration(_ context.Context, _ *ofrep.GetProviderConfigurationRequest) (*ofrep.GetProviderConfigurationResponse, error)
GetProviderConfiguration returns the configuration set by the running flipt instance.
func (*Server) RegisterGRPC ¶
RegisterGRPC registers the EvaluateServer onto the provided gRPC Server.