Help us shape the future of Go! Take the 2026 Go Developer Survey

hooks

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package hooks provides OpenFeature hooks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggingHook

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

LoggingHook is a of.Hook that logs the flag evaluation lifecycle.

func NewLoggingHook

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

NewLoggingHook returns a new LoggingHook with the provided logger.

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, hookHints of.HookHints) (*of.EvaluationContext, error)

func (*LoggingHook) Error

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

func (*LoggingHook) Finally

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

Jump to

Keyboard shortcuts

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