e80fa396d2
* Add priority queue to sdk * fix issue of storing pointers and now copy * update to use copy structure * Remove file, put Item struct def. into other file * add link * clean up docs * refactor internal data structure to hide heap method implementations. Other cleanup after feedback * rename PushItem and PopItem to just Push/Pop, after encapsulating the heap methods * updates after feedback * refactoring/renaming * guard against pushing a nil item * minor updates after feedback * Add read lock to the Len() method and move the interface check into the test file * fix a deadlock * make the mutex a RWMutex, and make it private again * nil check itemRaw before trying to type cast it
10 lines
370 B
Markdown
10 lines
370 B
Markdown
Vault SDK - Queue
|
|
=================
|
|
|
|
The `queue` package provides Vault plugins with a Priority Queue. It can be used
|
|
as an in-memory list of `queue.Item` sorted by their `priority`, and offers
|
|
methods to find or remove items by their key. Internally it
|
|
uses `container/heap`; see [Example Priority
|
|
Queue](https://golang.org/pkg/container/heap/#example__priorityQueue)
|
|
|