test

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestInvalidPoolCreation

func TestInvalidPoolCreation(t *testing.T)

func TestMemoryContextCreation

func TestMemoryContextCreation(t *testing.T)

func TestValidPoolCreation

func TestValidPoolCreation(t *testing.T)

Types

type DefaultConfigValues

type DefaultConfigValues struct {
	InitialCapacity                    int
	HardLimit                          int
	GrowthPercent                      float64
	FixedGrowthFactor                  float64
	ExponentialThresholdFactor         float64
	ShrinkAggressiveness               pool.AggressivenessLevel
	ShrinkCheckInterval                time.Duration
	IdleThreshold                      time.Duration
	MinIdleBeforeShrink                int
	ShrinkCooldown                     time.Duration
	MinUtilizationBeforeShrink         float64
	StableUnderutilizationRounds       int
	ShrinkPercent                      float64
	MinShrinkCapacity                  int
	MaxConsecutiveShrinks              int
	InitialSize                        int
	FillAggressiveness                 float64
	RefillPercent                      float64
	EnableChannelGrowth                bool
	GrowthEventsTrigger                int
	FastPathGrowthPercent              float64
	FastPathExponentialThresholdFactor float64
	FastPathFixedGrowthFactor          float64
	ShrinkEventsTrigger                int
	FastPathShrinkAggressiveness       pool.AggressivenessLevel
	FastPathShrinkPercent              float64
	FastPathShrinkMinCapacity          int
	Verbose                            bool
	RingBufferBlocking                 bool
	ReadTimeout                        time.Duration
	WriteTimeout                       time.Duration
}

DefaultConfigValues stores all default configuration values

type Job

type Job struct {
	ID        int
	Processor *TestObject
	Buffer    *TestBuffer
	Metadata  *TestMetadata
}

type TestBuffer

type TestBuffer struct {
	Data []byte
	Size int
}

type TestJob

type TestJob struct {
	ID        int
	Buffer    TestBuffer
	Metadata  TestMetadata
	CreatedAt time.Time
}

type TestMetadata

type TestMetadata struct {
	Priority  int
	Tags      []string
	Timestamp time.Time
}

type TestObject

type TestObject struct {
	Value int
}

Jump to

Keyboard shortcuts

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