hooks

package
v1.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DOMAIN_KEY             = "domain"
	PROVIDER_NAME_KEY      = "provider_name"
	FLAG_KEY_KEY           = "flag_key"
	DEFAULT_VALUE_KEY      = "default_value"
	EVALUATION_CONTEXT_KEY = "evaluation_context"
	ERROR_MESSAGE_KEY      = "error_message"
	REASON_KEY             = "reason"
	VARIANT_KEY            = "variant"
	VALUE_KEY              = "value"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggingHook

type LoggingHook struct {
	// contains filtered or unexported fields
}

func NewCustomLoggingHook

func NewCustomLoggingHook(includeEvaluationContext bool, logger *slog.Logger) (*LoggingHook, error)

func NewLoggingHook

func NewLoggingHook(includeEvaluationContext bool) (*LoggingHook, error)

func (*LoggingHook) After

func (h *LoggingHook) After(ctx context.Context, hookContext of.HookContext,
	flagEvaluationDetails of.InterfaceEvaluationDetails, hookHints of.HookHints) error

func (*LoggingHook) Before

func (h *LoggingHook) Before(ctx context.Context, hookContext of.HookContext,
	hint of.HookHints) (*of.EvaluationContext, error)

func (*LoggingHook) Error

func (h *LoggingHook) Error(ctx context.Context, hookContext of.HookContext, err error, hint of.HookHints)

func (*LoggingHook) Finally

func (h *LoggingHook) Finally(ctx context.Context, hCtx of.HookContext, hint of.HookHints)

type MarshaledEvaluationContext

type MarshaledEvaluationContext struct {
	TargetingKey string
	Attributes   map[string]interface{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL