Documentation ¶
Index ¶
- Constants
- func WithJSON(marshal protojson.MarshalOptions, unmarshal protojson.UnmarshalOptions) connect.Option
- type ConnectService
- type FlagEvaluationService
- func (s *FlagEvaluationService) EventStream(ctx context.Context, req *connect.Request[evalV1.EventStreamRequest], ...) error
- func (s *FlagEvaluationService) ResolveAll(ctx context.Context, req *connect.Request[evalV1.ResolveAllRequest]) (*connect.Response[evalV1.ResolveAllResponse], error)
- func (s *FlagEvaluationService) ResolveBoolean(ctx context.Context, req *connect.Request[evalV1.ResolveBooleanRequest]) (*connect.Response[evalV1.ResolveBooleanResponse], error)
- func (s *FlagEvaluationService) ResolveFloat(ctx context.Context, req *connect.Request[evalV1.ResolveFloatRequest]) (*connect.Response[evalV1.ResolveFloatResponse], error)
- func (s *FlagEvaluationService) ResolveInt(ctx context.Context, req *connect.Request[evalV1.ResolveIntRequest]) (*connect.Response[evalV1.ResolveIntResponse], error)
- func (s *FlagEvaluationService) ResolveObject(ctx context.Context, req *connect.Request[evalV1.ResolveObjectRequest]) (*connect.Response[evalV1.ResolveObjectResponse], error)
- func (s *FlagEvaluationService) ResolveString(ctx context.Context, req *connect.Request[evalV1.ResolveStringRequest]) (*connect.Response[evalV1.ResolveStringResponse], error)
- type OldFlagEvaluationService
- func (s *OldFlagEvaluationService) EventStream(ctx context.Context, req *connect.Request[schemaV1.EventStreamRequest], ...) error
- func (s *OldFlagEvaluationService) ResolveAll(ctx context.Context, req *connect.Request[schemaV1.ResolveAllRequest]) (*connect.Response[schemaV1.ResolveAllResponse], error)
- func (s *OldFlagEvaluationService) ResolveBoolean(ctx context.Context, req *connect.Request[schemaV1.ResolveBooleanRequest]) (*connect.Response[schemaV1.ResolveBooleanResponse], error)
- func (s *OldFlagEvaluationService) ResolveFloat(ctx context.Context, req *connect.Request[schemaV1.ResolveFloatRequest]) (*connect.Response[schemaV1.ResolveFloatResponse], error)
- func (s *OldFlagEvaluationService) ResolveInt(ctx context.Context, req *connect.Request[schemaV1.ResolveIntRequest]) (*connect.Response[schemaV1.ResolveIntResponse], error)
- func (s *OldFlagEvaluationService) ResolveObject(ctx context.Context, req *connect.Request[schemaV1.ResolveObjectRequest]) (*connect.Response[schemaV1.ResolveObjectResponse], error)
- func (s *OldFlagEvaluationService) ResolveString(ctx context.Context, req *connect.Request[schemaV1.ResolveStringRequest]) (*connect.Response[schemaV1.ResolveStringResponse], error)
Constants ¶
const (
ErrorPrefix = "FlagdError:"
)
Variables ¶
This section is empty.
Functions ¶
func WithJSON ¶ added in v0.6.3
func WithJSON(marshal protojson.MarshalOptions, unmarshal protojson.UnmarshalOptions) connect.Option
WithJSON customizes a connect-go Client or Handler's JSON by exposing MarshalOptions, and UnmarshalOptions See: https://github.com/connectrpc/connect-go/blob/main/codec.go Heavily inspired by https://github.com/akshayjshah/connectproto
Types ¶
type ConnectService ¶
type ConnectService struct {
// contains filtered or unexported fields
}
func NewConnectService ¶ added in v0.5.2
func NewConnectService( logger *logger.Logger, evaluator evaluator.IEvaluator, mRecorder *telemetry.MetricsRecorder, ) *ConnectService
NewConnectService creates a ConnectService with provided parameters
func (*ConnectService) AddMiddleware ¶ added in v0.5.0
func (s *ConnectService) AddMiddleware(mw middleware.IMiddleware)
func (*ConnectService) Notify ¶
func (s *ConnectService) Notify(n service.Notification)
Notify emits change event notifications for subscriptions
func (*ConnectService) Serve ¶
func (s *ConnectService) Serve(ctx context.Context, svcConf service.Configuration) error
Serve serves services with provided configuration options
func (*ConnectService) Shutdown ¶ added in v0.6.0
func (s *ConnectService) Shutdown()
type FlagEvaluationService ¶ added in v0.5.0
type FlagEvaluationService struct {
// contains filtered or unexported fields
}
func NewFlagEvaluationService ¶ added in v0.5.0
func NewFlagEvaluationService(log *logger.Logger, eval evaluator.IEvaluator, eventingCfg *eventingConfiguration, metricsRecorder *telemetry.MetricsRecorder, ) *FlagEvaluationService
NewFlagEvaluationService creates a FlagEvaluationService with provided parameters
func (*FlagEvaluationService) EventStream ¶ added in v0.5.0
func (s *FlagEvaluationService) EventStream( ctx context.Context, req *connect.Request[evalV1.EventStreamRequest], stream *connect.ServerStream[evalV1.EventStreamResponse], ) error
func (*FlagEvaluationService) ResolveAll ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveAll( ctx context.Context, req *connect.Request[evalV1.ResolveAllRequest], ) (*connect.Response[evalV1.ResolveAllResponse], error)
nolint:dupl,funlen
func (*FlagEvaluationService) ResolveBoolean ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveBoolean( ctx context.Context, req *connect.Request[evalV1.ResolveBooleanRequest], ) (*connect.Response[evalV1.ResolveBooleanResponse], error)
func (*FlagEvaluationService) ResolveFloat ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveFloat( ctx context.Context, req *connect.Request[evalV1.ResolveFloatRequest], ) (*connect.Response[evalV1.ResolveFloatResponse], error)
func (*FlagEvaluationService) ResolveInt ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveInt( ctx context.Context, req *connect.Request[evalV1.ResolveIntRequest], ) (*connect.Response[evalV1.ResolveIntResponse], error)
func (*FlagEvaluationService) ResolveObject ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveObject( ctx context.Context, req *connect.Request[evalV1.ResolveObjectRequest], ) (*connect.Response[evalV1.ResolveObjectResponse], error)
func (*FlagEvaluationService) ResolveString ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveString( ctx context.Context, req *connect.Request[evalV1.ResolveStringRequest], ) (*connect.Response[evalV1.ResolveStringResponse], error)
type OldFlagEvaluationService ¶ added in v0.7.3
type OldFlagEvaluationService struct {
// contains filtered or unexported fields
}
OldFlagEvaluationService implements the methods required for the soon-to-be deprecated flag evaluation schema this can be removed as a part of https://github.com/open-feature/flagd/issues/1088
func NewOldFlagEvaluationService ¶ added in v0.7.3
func NewOldFlagEvaluationService(log *logger.Logger, eval evaluator.IEvaluator, eventingCfg *eventingConfiguration, metricsRecorder *telemetry.MetricsRecorder, ) *OldFlagEvaluationService
NewOldFlagEvaluationService creates a OldFlagEvaluationService with provided parameters
func (*OldFlagEvaluationService) EventStream ¶ added in v0.7.3
func (s *OldFlagEvaluationService) EventStream( ctx context.Context, req *connect.Request[schemaV1.EventStreamRequest], stream *connect.ServerStream[schemaV1.EventStreamResponse], ) error
func (*OldFlagEvaluationService) ResolveAll ¶ added in v0.7.3
func (s *OldFlagEvaluationService) ResolveAll( ctx context.Context, req *connect.Request[schemaV1.ResolveAllRequest], ) (*connect.Response[schemaV1.ResolveAllResponse], error)
nolint:dupl
func (*OldFlagEvaluationService) ResolveBoolean ¶ added in v0.7.3
func (s *OldFlagEvaluationService) ResolveBoolean( ctx context.Context, req *connect.Request[schemaV1.ResolveBooleanRequest], ) (*connect.Response[schemaV1.ResolveBooleanResponse], error)
func (*OldFlagEvaluationService) ResolveFloat ¶ added in v0.7.3
func (s *OldFlagEvaluationService) ResolveFloat( ctx context.Context, req *connect.Request[schemaV1.ResolveFloatRequest], ) (*connect.Response[schemaV1.ResolveFloatResponse], error)
func (*OldFlagEvaluationService) ResolveInt ¶ added in v0.7.3
func (s *OldFlagEvaluationService) ResolveInt( ctx context.Context, req *connect.Request[schemaV1.ResolveIntRequest], ) (*connect.Response[schemaV1.ResolveIntResponse], error)
func (*OldFlagEvaluationService) ResolveObject ¶ added in v0.7.3
func (s *OldFlagEvaluationService) ResolveObject( ctx context.Context, req *connect.Request[schemaV1.ResolveObjectRequest], ) (*connect.Response[schemaV1.ResolveObjectResponse], error)
func (*OldFlagEvaluationService) ResolveString ¶ added in v0.7.3
func (s *OldFlagEvaluationService) ResolveString( ctx context.Context, req *connect.Request[schemaV1.ResolveStringRequest], ) (*connect.Response[schemaV1.ResolveStringResponse], error)