destructure

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedDestructurer

type CachedDestructurer struct {
	*DefaultDestructurer
	// contains filtered or unexported fields
}

CachedDestructurer is a destructurer that caches type information.

func NewCachedDestructurer

func NewCachedDestructurer() *CachedDestructurer

NewCachedDestructurer creates a new cached destructurer.

func (*CachedDestructurer) TryDestructure

func (d *CachedDestructurer) TryDestructure(value interface{}, propertyFactory core.LogEventPropertyFactory) (*core.LogEventProperty, bool)

TryDestructure attempts to destructure a value using cached type information.

type DefaultDestructurer

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

DefaultDestructurer is the default implementation of core.Destructurer.

func NewDefaultDestructurer

func NewDefaultDestructurer() *DefaultDestructurer

NewDefaultDestructurer creates a new destructurer with default settings.

func NewDestructurer

func NewDestructurer(maxDepth, maxStringLength, maxCollectionCount int) *DefaultDestructurer

NewDestructurer creates a destructurer with custom limits.

func (*DefaultDestructurer) RegisterScalarType

func (d *DefaultDestructurer) RegisterScalarType(t reflect.Type)

RegisterScalarType registers a type that should be treated as a scalar.

func (*DefaultDestructurer) TryDestructure

func (d *DefaultDestructurer) TryDestructure(value interface{}, propertyFactory core.LogEventPropertyFactory) (*core.LogEventProperty, bool)

TryDestructure attempts to destructure a value into a log-friendly representation.

Jump to

Keyboard shortcuts

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