Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DivergeHook ¶
type DivergeHook struct {
of.UnimplementedHook
// contains filtered or unexported fields
}
DivergeHook is an OpenFeature hook that enriches the EvaluationContext with Diverge preview environment metadata.
func NewDivergeHook ¶
func NewDivergeHook(opts ...Option) *DivergeHook
NewDivergeHook creates a new DivergeHook with optional configuration.
func (*DivergeHook) Before ¶
func (h *DivergeHook) Before(ctx context.Context, hookCtx of.HookContext, hints of.HookHints) (*of.EvaluationContext, error)
Before executes prior to flag evaluation, injecting diverge.environment and diverge.is_preview into EvaluationContext.
type Option ¶
type Option func(*DivergeHook)
Option is a functional option for configuring DivergeHook.
func WithFallbackEnvironment ¶
WithFallbackEnvironment sets a default environment if none is found in the context or process env.
Click to show internal directories.
Click to hide internal directories.