internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSignalTimeout = time.Duration(0)

DefaultInfiniteTimeout provides a default time to send a signal

Variables

View Source
var ConfigSignalTimeout = DefaultSignalTimeout

ConfigSignalTimeout is a global variable that can be used to configure the signal timeout

Functions

func Dequeue

func Dequeue(data []interface{}) (interface{}, []interface{}, bool)

Dequeue can be used to remove an item from the queue and reduce its capacity by one

func DequeueMultiple

func DequeueMultiple(n int, data []interface{}) ([]interface{}, []interface{}, bool)

DequeueMultiple will return a number of items less than or equal to the value of n while maintaining the input data on the second slice of interface, it will return true if there are no items to dequeue

func Enqueue

func Enqueue(dataIn []interface{}, item interface{}) (bool, []interface{})

Enqueue can be used to add an item to the back of a queue while maintaining it's capacity (e.g. in-place) it will return true if the queue is full

func EnqueueInFront

func EnqueueInFront(data []interface{}, item interface{}) (bool, []interface{})

EnqueueInFront can be used to add an item to the front of the queue while maintaining its capacity, it will return true if the queue is full

func RotateLeft

func RotateLeft(dataIn []interface{}) []interface{}

RotateLeft can be used to perform an in-place rotation left of a slice of empty interface

func RotateRight

func RotateRight(dataIn []interface{}) []interface{}

RotateRight can be used to perform an in-place rotation right of a slice of empty interface

func SendSignal

func SendSignal(signal chan struct{}) bool

SendSignal will perform a non-blocking send with or without a timeout depending on whether ConfigSignalTimeout is greater than 0

Types

This section is empty.

Jump to

Keyboard shortcuts

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