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[schemaV1.EventStreamRequest], ...) error
- func (s *FlagEvaluationService) ResolveAll(ctx context.Context, req *connect.Request[schemaV1.ResolveAllRequest]) (*connect.Response[schemaV1.ResolveAllResponse], error)
- func (s *FlagEvaluationService) ResolveBoolean(ctx context.Context, req *connect.Request[schemaV1.ResolveBooleanRequest]) (*connect.Response[schemaV1.ResolveBooleanResponse], error)
- func (s *FlagEvaluationService) ResolveFloat(ctx context.Context, req *connect.Request[schemaV1.ResolveFloatRequest]) (*connect.Response[schemaV1.ResolveFloatResponse], error)
- func (s *FlagEvaluationService) ResolveInt(ctx context.Context, req *connect.Request[schemaV1.ResolveIntRequest]) (*connect.Response[schemaV1.ResolveIntResponse], error)
- func (s *FlagEvaluationService) ResolveObject(ctx context.Context, req *connect.Request[schemaV1.ResolveObjectRequest]) (*connect.Response[schemaV1.ResolveObjectResponse], error)
- func (s *FlagEvaluationService) ResolveString(ctx context.Context, req *connect.Request[schemaV1.ResolveStringRequest]) (*connect.Response[schemaV1.ResolveStringResponse], error)
Constants ¶
View Source
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 eval.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 eval.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[schemaV1.EventStreamRequest], stream *connect.ServerStream[schemaV1.EventStreamResponse], ) error
func (*FlagEvaluationService) ResolveAll ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveAll( ctx context.Context, req *connect.Request[schemaV1.ResolveAllRequest], ) (*connect.Response[schemaV1.ResolveAllResponse], error)
func (*FlagEvaluationService) ResolveBoolean ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveBoolean( ctx context.Context, req *connect.Request[schemaV1.ResolveBooleanRequest], ) (*connect.Response[schemaV1.ResolveBooleanResponse], error)
func (*FlagEvaluationService) ResolveFloat ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveFloat( ctx context.Context, req *connect.Request[schemaV1.ResolveFloatRequest], ) (*connect.Response[schemaV1.ResolveFloatResponse], error)
func (*FlagEvaluationService) ResolveInt ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveInt( ctx context.Context, req *connect.Request[schemaV1.ResolveIntRequest], ) (*connect.Response[schemaV1.ResolveIntResponse], error)
func (*FlagEvaluationService) ResolveObject ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveObject( ctx context.Context, req *connect.Request[schemaV1.ResolveObjectRequest], ) (*connect.Response[schemaV1.ResolveObjectResponse], error)
func (*FlagEvaluationService) ResolveString ¶ added in v0.5.0
func (s *FlagEvaluationService) ResolveString( ctx context.Context, req *connect.Request[schemaV1.ResolveStringRequest], ) (*connect.Response[schemaV1.ResolveStringResponse], error)
Click to show internal directories.
Click to hide internal directories.