Documentation
¶
Index ¶
- Constants
- Variables
- func Dequeue(data []interface{}) (interface{}, []interface{}, bool)
- func DequeueMultiple(n int, data []interface{}) ([]interface{}, []interface{}, bool)
- func Enqueue(dataIn []interface{}, item interface{}) (bool, []interface{})
- func EnqueueInFront(data []interface{}, item interface{}) (bool, []interface{})
- func RotateLeft(dataIn []interface{}) []interface{}
- func RotateRight(dataIn []interface{}) []interface{}
- func SendSignal(signal chan struct{}) bool
Constants ¶
const DefaultSignalTimeout = time.Duration(0)
DefaultInfiniteTimeout provides a default time to send a signal
Variables ¶
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 ¶
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.