config

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RingBufferConfig

type RingBufferConfig[T any] struct {
	Block             bool
	RTimeout          time.Duration
	WTimeout          time.Duration
	PreReadBlockHook  func() (obj T, tryAgain bool, success bool)
	PreWriteBlockHook func() bool
}

RingBufferConfig holds the configuration for a RingBuffer

func (*RingBufferConfig[T]) GetPreReadBlockHook

func (c *RingBufferConfig[T]) GetPreReadBlockHook() func() (obj T, tryAgain bool, success bool)

GetPreReadBlockHook returns the pre-read block hook function

func (*RingBufferConfig[T]) GetPreWriteBlockHook

func (c *RingBufferConfig[T]) GetPreWriteBlockHook() func() bool

GetPreWriteBlockHook returns the pre-write block hook function

func (*RingBufferConfig[T]) GetReadTimeout

func (c *RingBufferConfig[T]) GetReadTimeout() time.Duration

GetReadTimeout returns the read timeout duration

func (*RingBufferConfig[T]) GetWriteTimeout

func (c *RingBufferConfig[T]) GetWriteTimeout() time.Duration

GetWriteTimeout returns the write timeout duration

func (*RingBufferConfig[T]) IsBlocking

func (c *RingBufferConfig[T]) IsBlocking() bool

IsBlocking returns whether the buffer is in blocking mode

Jump to

Keyboard shortcuts

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