{"id":13397019,"url":"https://github.com/autom8ter/dagger","last_synced_at":"2025-04-07T06:11:25.361Z","repository":{"id":41336170,"uuid":"305223902","full_name":"autom8ter/dagger","owner":"autom8ter","description":"dagger is a fast, concurrency safe, mutable, in-memory directed graph library. Also includes a number of generic, concurrency safe data-structures","archived":false,"fork":false,"pushed_at":"2023-07-07T04:11:58.000Z","size":264,"stargazers_count":304,"open_issues_count":2,"forks_count":16,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-07-31T18:18:39.450Z","etag":null,"topics":["concurrency","directed-acyclic-graph","generics","golang","golang-library","queue","stack"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/autom8ter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-10-19T00:33:10.000Z","updated_at":"2024-07-26T17:28:26.000Z","dependencies_parsed_at":"2023-10-20T18:08:12.917Z","dependency_job_id":null,"html_url":"https://github.com/autom8ter/dagger","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autom8ter%2Fdagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autom8ter%2Fdagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autom8ter%2Fdagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autom8ter%2Fdagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/autom8ter","download_url":"https://codeload.github.com/autom8ter/dagger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601448,"owners_count":20964864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concurrency","directed-acyclic-graph","generics","golang","golang-library","queue","stack"],"created_at":"2024-07-30T18:01:09.473Z","updated_at":"2025-04-07T06:11:25.342Z","avatar_url":"https://github.com/autom8ter.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003c!-- Code generated by gomarkdoc. DO NOT EDIT --\u003e\n\n# dagger\n\n```go\nimport \"github.com/autom8ter/dagger/v3\"\n```\n\nPackage dagger is a collection of generic, concurrency safe datastructures including a Directed Acyclic Graph and others. Datastructures are implemented using generics in Go 1.18.\n\nSupported Datastructures:\n\nDAG: thread safe directed acyclic graph\n\nQueue: unbounded thread safe fifo queue\n\nStack: unbounded thread safe lifo stack\n\nBoundedQueue: bounded thread safe fifo queue with a fixed capacity\n\nPriorityQueue: thread safe priority queue\n\nHashMap: thread safe hashmap\n\nSet: thread safe set\n\nChannelGroup: thread safe group of channels for broadcasting 1 value to N channels\n\nMultiContext: thread safe context for coordinating the cancellation of multiple contexts\n\nBorrower: thread safe object ownership manager\n\n## Index\n\n- [func UniqueID\\(prefix string\\) string](\u003c#UniqueID\u003e)\n- [type BoundedQueue](\u003c#BoundedQueue\u003e)\n  - [func NewBoundedQueue\\[T any\\]\\(maxSize int\\) \\*BoundedQueue\\[T\\]](\u003c#NewBoundedQueue\u003e)\n  - [func \\(q \\*BoundedQueue\\[T\\]\\) Close\\(\\)](\u003c#BoundedQueue[T].Close\u003e)\n  - [func \\(q \\*BoundedQueue\\[T\\]\\) Len\\(\\) int](\u003c#BoundedQueue[T].Len\u003e)\n  - [func \\(q \\*BoundedQueue\\[T\\]\\) Pop\\(\\) \\(T, bool\\)](\u003c#BoundedQueue[T].Pop\u003e)\n  - [func \\(q \\*BoundedQueue\\[T\\]\\) PopContext\\(ctx context.Context\\) \\(T, bool\\)](\u003c#BoundedQueue[T].PopContext\u003e)\n  - [func \\(q \\*BoundedQueue\\[T\\]\\) Push\\(val T\\) bool](\u003c#BoundedQueue[T].Push\u003e)\n  - [func \\(q \\*BoundedQueue\\[T\\]\\) PushContext\\(ctx context.Context, val T\\) bool](\u003c#BoundedQueue[T].PushContext\u003e)\n  - [func \\(q \\*BoundedQueue\\[T\\]\\) Range\\(fn func\\(element T\\) bool\\)](\u003c#BoundedQueue[T].Range\u003e)\n  - [func \\(q \\*BoundedQueue\\[T\\]\\) RangeContext\\(ctx context.Context, fn func\\(element T\\) bool\\)](\u003c#BoundedQueue[T].RangeContext\u003e)\n- [type DAG](\u003c#DAG\u003e)\n  - [func NewDAG\\[T Node\\]\\(opts ...DagOpt\\) \\(\\*DAG\\[T\\], error\\)](\u003c#NewDAG\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) Acyclic\\(\\) bool](\u003c#DAG[T].Acyclic\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) BFS\\(ctx context.Context, reverse bool, start \\*GraphNode\\[T\\], search GraphSearchFunc\\[T\\]\\) error](\u003c#DAG[T].BFS\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) DFS\\(ctx context.Context, reverse bool, start \\*GraphNode\\[T\\], fn GraphSearchFunc\\[T\\]\\) error](\u003c#DAG[T].DFS\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) GetEdge\\(id string\\) \\(\\*GraphEdge\\[T\\], bool\\)](\u003c#DAG[T].GetEdge\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) GetEdges\\(\\) \\[\\]\\*GraphEdge\\[T\\]](\u003c#DAG[T].GetEdges\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) GetNode\\(id string\\) \\(\\*GraphNode\\[T\\], bool\\)](\u003c#DAG[T].GetNode\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) GetNodes\\(\\) \\[\\]\\*GraphNode\\[T\\]](\u003c#DAG[T].GetNodes\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) GraphViz\\(\\) \\(image.Image, error\\)](\u003c#DAG[T].GraphViz\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) HasEdge\\(id string\\) bool](\u003c#DAG[T].HasEdge\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) HasNode\\(id string\\) bool](\u003c#DAG[T].HasNode\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) RangeEdges\\(fn func\\(e \\*GraphEdge\\[T\\]\\) bool\\)](\u003c#DAG[T].RangeEdges\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) RangeNodes\\(fn func\\(n \\*GraphNode\\[T\\]\\) bool\\)](\u003c#DAG[T].RangeNodes\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) SetNode\\(node Node\\) \\*GraphNode\\[T\\]](\u003c#DAG[T].SetNode\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) Size\\(\\) \\(int, int\\)](\u003c#DAG[T].Size\u003e)\n  - [func \\(g \\*DAG\\[T\\]\\) TopologicalSort\\(reverse bool\\) \\(\\[\\]\\*GraphNode\\[T\\], error\\)](\u003c#DAG[T].TopologicalSort\u003e)\n- [type DagOpt](\u003c#DagOpt\u003e)\n  - [func WithVizualization\\(\\) DagOpt](\u003c#WithVizualization\u003e)\n- [type GraphEdge](\u003c#GraphEdge\u003e)\n  - [func \\(n \\*GraphEdge\\[T\\]\\) From\\(\\) \\*GraphNode\\[T\\]](\u003c#GraphEdge[T].From\u003e)\n  - [func \\(n \\*GraphEdge\\[T\\]\\) ID\\(\\) string](\u003c#GraphEdge[T].ID\u003e)\n  - [func \\(n \\*GraphEdge\\[T\\]\\) Metadata\\(\\) map\\[string\\]string](\u003c#GraphEdge[T].Metadata\u003e)\n  - [func \\(n \\*GraphEdge\\[T\\]\\) Relationship\\(\\) string](\u003c#GraphEdge[T].Relationship\u003e)\n  - [func \\(n \\*GraphEdge\\[T\\]\\) SetMetadata\\(metadata map\\[string\\]string\\)](\u003c#GraphEdge[T].SetMetadata\u003e)\n  - [func \\(n \\*GraphEdge\\[T\\]\\) To\\(\\) \\*GraphNode\\[T\\]](\u003c#GraphEdge[T].To\u003e)\n- [type GraphNode](\u003c#GraphNode\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) Ancestors\\(fn func\\(node \\*GraphNode\\[T\\]\\) bool\\)](\u003c#GraphNode[T].Ancestors\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) BFS\\(ctx context.Context, reverse bool, fn GraphSearchFunc\\[T\\]\\) error](\u003c#GraphNode[T].BFS\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) DFS\\(ctx context.Context, reverse bool, fn GraphSearchFunc\\[T\\]\\) error](\u003c#GraphNode[T].DFS\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) Descendants\\(fn func\\(node \\*GraphNode\\[T\\]\\) bool\\)](\u003c#GraphNode[T].Descendants\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) EdgesFrom\\(relationship string, fn func\\(e \\*GraphEdge\\[T\\]\\) bool\\)](\u003c#GraphNode[T].EdgesFrom\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) EdgesTo\\(relationship string, fn func\\(e \\*GraphEdge\\[T\\]\\) bool\\)](\u003c#GraphNode[T].EdgesTo\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) Graph\\(\\) \\*DAG\\[T\\]](\u003c#GraphNode[T].Graph\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) IsConnectedTo\\(node \\*GraphNode\\[T\\]\\) bool](\u003c#GraphNode[T].IsConnectedTo\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) Remove\\(\\) error](\u003c#GraphNode[T].Remove\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) RemoveEdge\\(edgeID string\\)](\u003c#GraphNode[T].RemoveEdge\u003e)\n  - [func \\(n \\*GraphNode\\[T\\]\\) SetEdge\\(relationship string, toNode Node, metadata map\\[string\\]string\\) \\(\\*GraphEdge\\[T\\], error\\)](\u003c#GraphNode[T].SetEdge\u003e)\n- [type GraphSearchFunc](\u003c#GraphSearchFunc\u003e)\n- [type HashMap](\u003c#HashMap\u003e)\n  - [func NewHashMap\\[K comparable, V any\\]\\(\\) \\*HashMap\\[K, V\\]](\u003c#NewHashMap\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Clear\\(\\)](\u003c#HashMap[K, V].Clear\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Delete\\(key K\\)](\u003c#HashMap[K, V].Delete\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Exists\\(key K\\) bool](\u003c#HashMap[K, V].Exists\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Filter\\(f func\\(key K, value V\\) bool\\) \\*HashMap\\[K, V\\]](\u003c#HashMap[K, V].Filter\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Get\\(key K\\) \\(V, bool\\)](\u003c#HashMap[K, V].Get\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Keys\\(\\) \\[\\]K](\u003c#HashMap[K, V].Keys\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Len\\(\\) int](\u003c#HashMap[K, V].Len\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Map\\(\\) map\\[K\\]V](\u003c#HashMap[K, V].Map\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Range\\(f func\\(key K, value V\\) bool\\)](\u003c#HashMap[K, V].Range\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Set\\(key K, value V\\)](\u003c#HashMap[K, V].Set\u003e)\n  - [func \\(n \\*HashMap\\[K, V\\]\\) Values\\(\\) \\[\\]V](\u003c#HashMap[K, V].Values\u003e)\n- [type Node](\u003c#Node\u003e)\n- [type PriorityQueue](\u003c#PriorityQueue\u003e)\n  - [func NewPriorityQueue\\[T any\\]\\(\\) \\*PriorityQueue\\[T\\]](\u003c#NewPriorityQueue\u003e)\n  - [func \\(q \\*PriorityQueue\\[T\\]\\) Len\\(\\) int](\u003c#PriorityQueue[T].Len\u003e)\n  - [func \\(q \\*PriorityQueue\\[T\\]\\) Peek\\(\\) \\(T, bool\\)](\u003c#PriorityQueue[T].Peek\u003e)\n  - [func \\(q \\*PriorityQueue\\[T\\]\\) Pop\\(\\) \\(T, bool\\)](\u003c#PriorityQueue[T].Pop\u003e)\n  - [func \\(q \\*PriorityQueue\\[T\\]\\) Push\\(item T, weight float64\\)](\u003c#PriorityQueue[T].Push\u003e)\n  - [func \\(q \\*PriorityQueue\\[T\\]\\) UpdatePriority\\(value T, priority float64\\)](\u003c#PriorityQueue[T].UpdatePriority\u003e)\n- [type Queue](\u003c#Queue\u003e)\n  - [func NewQueue\\[T any\\]\\(\\) \\*Queue\\[T\\]](\u003c#NewQueue\u003e)\n  - [func \\(s \\*Queue\\[T\\]\\) Len\\(\\) int](\u003c#Queue[T].Len\u003e)\n  - [func \\(s \\*Queue\\[T\\]\\) Peek\\(\\) \\(T, bool\\)](\u003c#Queue[T].Peek\u003e)\n  - [func \\(s \\*Queue\\[T\\]\\) Pop\\(\\) \\(T, bool\\)](\u003c#Queue[T].Pop\u003e)\n  - [func \\(s \\*Queue\\[T\\]\\) Push\\(f T\\)](\u003c#Queue[T].Push\u003e)\n  - [func \\(q \\*Queue\\[T\\]\\) Range\\(fn func\\(element T\\) bool\\)](\u003c#Queue[T].Range\u003e)\n  - [func \\(q \\*Queue\\[T\\]\\) RangeUntil\\(fn func\\(element T\\) bool, done chan struct\\{\\}\\)](\u003c#Queue[T].RangeUntil\u003e)\n- [type Set](\u003c#Set\u003e)\n  - [func NewSet\\[T comparable\\]\\(\\) \\*Set\\[T\\]](\u003c#NewSet\u003e)\n  - [func \\(s \\*Set\\[T\\]\\) Add\\(val T\\)](\u003c#Set[T].Add\u003e)\n  - [func \\(s \\*Set\\[T\\]\\) Contains\\(val T\\) bool](\u003c#Set[T].Contains\u003e)\n  - [func \\(s \\*Set\\[T\\]\\) Len\\(\\) int](\u003c#Set[T].Len\u003e)\n  - [func \\(s \\*Set\\[T\\]\\) Range\\(fn func\\(element T\\) bool\\)](\u003c#Set[T].Range\u003e)\n  - [func \\(s \\*Set\\[T\\]\\) Remove\\(val T\\)](\u003c#Set[T].Remove\u003e)\n  - [func \\(s \\*Set\\[T\\]\\) Sort\\(lessFunc func\\(i T, j T\\) bool\\) \\[\\]T](\u003c#Set[T].Sort\u003e)\n  - [func \\(s \\*Set\\[T\\]\\) Values\\(\\) \\[\\]T](\u003c#Set[T].Values\u003e)\n- [type Stack](\u003c#Stack\u003e)\n  - [func NewStack\\[T any\\]\\(\\) \\*Stack\\[T\\]](\u003c#NewStack\u003e)\n  - [func \\(s \\*Stack\\[T\\]\\) Clear\\(\\)](\u003c#Stack[T].Clear\u003e)\n  - [func \\(s \\*Stack\\[T\\]\\) Len\\(\\) int](\u003c#Stack[T].Len\u003e)\n  - [func \\(s \\*Stack\\[T\\]\\) Peek\\(\\) \\(T, bool\\)](\u003c#Stack[T].Peek\u003e)\n  - [func \\(s \\*Stack\\[T\\]\\) Pop\\(\\) \\(T, bool\\)](\u003c#Stack[T].Pop\u003e)\n  - [func \\(s \\*Stack\\[T\\]\\) Push\\(f T\\)](\u003c#Stack[T].Push\u003e)\n  - [func \\(s \\*Stack\\[T\\]\\) Range\\(fn func\\(element T\\) bool\\)](\u003c#Stack[T].Range\u003e)\n  - [func \\(s \\*Stack\\[T\\]\\) RangeUntil\\(fn func\\(element T\\) bool, done chan struct\\{\\}\\)](\u003c#Stack[T].RangeUntil\u003e)\n  - [func \\(s \\*Stack\\[T\\]\\) Sort\\(lessFunc func\\(i T, j T\\) bool\\) \\[\\]T](\u003c#Stack[T].Sort\u003e)\n  - [func \\(s \\*Stack\\[T\\]\\) Values\\(\\) \\[\\]T](\u003c#Stack[T].Values\u003e)\n\n\n\u003ca name=\"UniqueID\"\u003e\u003c/a\u003e\n## func [UniqueID](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L50\u003e)\n\n```go\nfunc UniqueID(prefix string) string\n```\n\nUniqueID returns a unique identifier with the given prefix\n\n\u003ca name=\"BoundedQueue\"\u003e\u003c/a\u003e\n## type [BoundedQueue](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L922-L925\u003e)\n\nBoundedQueue is a basic FIFO BoundedQueue based on a buffered channel\n\n```go\ntype BoundedQueue[T any] struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"NewBoundedQueue\"\u003e\u003c/a\u003e\n### func [NewBoundedQueue](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L929\u003e)\n\n```go\nfunc NewBoundedQueue[T any](maxSize int) *BoundedQueue[T]\n```\n\nNewBoundedQueue returns a new BoundedQueue with the given max size. When the max size is reached, the queue will block until a value is removed. If maxSize is 0, the queue will always block until a value is removed. The BoundedQueue is concurrent\\-safe.\n\n\u003ca name=\"BoundedQueue[T].Close\"\u003e\u003c/a\u003e\n### func \\(\\*BoundedQueue\\[T\\]\\) [Close](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L961\u003e)\n\n```go\nfunc (q *BoundedQueue[T]) Close()\n```\n\nClose closes the BoundedQueue channel.\n\n\u003ca name=\"BoundedQueue[T].Len\"\u003e\u003c/a\u003e\n### func \\(\\*BoundedQueue\\[T\\]\\) [Len](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L991\u003e)\n\n```go\nfunc (q *BoundedQueue[T]) Len() int\n```\n\nLen returns the number of elements in the BoundedQueue.\n\n\u003ca name=\"BoundedQueue[T].Pop\"\u003e\u003c/a\u003e\n### func \\(\\*BoundedQueue\\[T\\]\\) [Pop](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L980\u003e)\n\n```go\nfunc (q *BoundedQueue[T]) Pop() (T, bool)\n```\n\nPop removes and returns an element from the beginning of the BoundedQueue.\n\n\u003ca name=\"BoundedQueue[T].PopContext\"\u003e\u003c/a\u003e\n### func \\(\\*BoundedQueue\\[T\\]\\) [PopContext](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L986\u003e)\n\n```go\nfunc (q *BoundedQueue[T]) PopContext(ctx context.Context) (T, bool)\n```\n\nPopContext removes and returns an element from the beginning of the BoundedQueue. If no element is available, it will block until an element is available or the context is cancelled.\n\n\u003ca name=\"BoundedQueue[T].Push\"\u003e\u003c/a\u003e\n### func \\(\\*BoundedQueue\\[T\\]\\) [Push](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L969\u003e)\n\n```go\nfunc (q *BoundedQueue[T]) Push(val T) bool\n```\n\nPush adds an element to the end of the BoundedQueue and returns a channel that will block until the element is added. If the queue is full, it will block until an element is removed.\n\n\u003ca name=\"BoundedQueue[T].PushContext\"\u003e\u003c/a\u003e\n### func \\(\\*BoundedQueue\\[T\\]\\) [PushContext](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L975\u003e)\n\n```go\nfunc (q *BoundedQueue[T]) PushContext(ctx context.Context, val T) bool\n```\n\nPushContext adds an element to the end of the BoundedQueue and returns a channel that will block until the element is added. If the queue is full, it will block until an element is removed or the context is cancelled.\n\n\u003ca name=\"BoundedQueue[T].Range\"\u003e\u003c/a\u003e\n### func \\(\\*BoundedQueue\\[T\\]\\) [Range](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L934\u003e)\n\n```go\nfunc (q *BoundedQueue[T]) Range(fn func(element T) bool)\n```\n\nRange executes a provided function once for each BoundedQueue element until it returns false.\n\n\u003ca name=\"BoundedQueue[T].RangeContext\"\u003e\u003c/a\u003e\n### func \\(\\*BoundedQueue\\[T\\]\\) [RangeContext](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L948\u003e)\n\n```go\nfunc (q *BoundedQueue[T]) RangeContext(ctx context.Context, fn func(element T) bool)\n```\n\nRangeContext executes a provided function once for each BoundedQueue element until it returns false or a value is sent to the done channel. Use this function when you want to continuously process items from the queue until a done signal is received.\n\n\u003ca name=\"DAG\"\u003e\u003c/a\u003e\n## type [DAG](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L322-L329\u003e)\n\nDAG is a concurrency safe, mutable, in\\-memory directed graph\n\n```go\ntype DAG[T Node] struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"NewDAG\"\u003e\u003c/a\u003e\n### func [NewDAG](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L346\u003e)\n\n```go\nfunc NewDAG[T Node](opts ...DagOpt) (*DAG[T], error)\n```\n\nNewDAG creates a new Directed Acyclic Graph instance\n\n\u003ca name=\"DAG[T].Acyclic\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [Acyclic](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L646\u003e)\n\n```go\nfunc (g *DAG[T]) Acyclic() bool\n```\n\nAcyclic returns true if the graph contains no cycles.\n\n\u003ca name=\"DAG[T].BFS\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [BFS](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L462\u003e)\n\n```go\nfunc (g *DAG[T]) BFS(ctx context.Context, reverse bool, start *GraphNode[T], search GraphSearchFunc[T]) error\n```\n\nBFS executes a depth first search on the graph starting from the current node. The reverse parameter determines whether the search is reversed or not. The fn parameter is a function that is called on each node in the graph. If the function returns false, the search is stopped.\n\n\u003ca name=\"DAG[T].DFS\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [DFS](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L489\u003e)\n\n```go\nfunc (g *DAG[T]) DFS(ctx context.Context, reverse bool, start *GraphNode[T], fn GraphSearchFunc[T]) error\n```\n\nDFS executes a depth first search on the graph starting from the current node. The reverse parameter determines whether the search is reversed or not. The fn parameter is a function that is called on each node in the graph. If the function returns false, the search is stopped.\n\n\u003ca name=\"DAG[T].GetEdge\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [GetEdge](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L437\u003e)\n\n```go\nfunc (g *DAG[T]) GetEdge(id string) (*GraphEdge[T], bool)\n```\n\nGetEdge returns the edge with the given id\n\n\u003ca name=\"DAG[T].GetEdges\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [GetEdges](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L427\u003e)\n\n```go\nfunc (g *DAG[T]) GetEdges() []*GraphEdge[T]\n```\n\nGetEdges returns all edges in the graph\n\n\u003ca name=\"DAG[T].GetNode\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [GetNode](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L406\u003e)\n\n```go\nfunc (g *DAG[T]) GetNode(id string) (*GraphNode[T], bool)\n```\n\nGetNode returns the node with the given id\n\n\u003ca name=\"DAG[T].GetNodes\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [GetNodes](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L417\u003e)\n\n```go\nfunc (g *DAG[T]) GetNodes() []*GraphNode[T]\n```\n\nGetNodes returns all nodes in the graph\n\n\u003ca name=\"DAG[T].GraphViz\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [GraphViz](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L731\u003e)\n\n```go\nfunc (g *DAG[T]) GraphViz() (image.Image, error)\n```\n\nGraphViz returns a graphviz image\n\n\u003ca name=\"DAG[T].HasEdge\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [HasEdge](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L400\u003e)\n\n```go\nfunc (g *DAG[T]) HasEdge(id string) bool\n```\n\nHasEdge returns true if the edge with the given id exists in the graph\n\n\u003ca name=\"DAG[T].HasNode\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [HasNode](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L394\u003e)\n\n```go\nfunc (g *DAG[T]) HasNode(id string) bool\n```\n\nHasNode returns true if the node with the given id exists in the graph\n\n\u003ca name=\"DAG[T].RangeEdges\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [RangeEdges](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L443\u003e)\n\n```go\nfunc (g *DAG[T]) RangeEdges(fn func(e *GraphEdge[T]) bool)\n```\n\nRangeEdges iterates over all edges in the graph\n\n\u003ca name=\"DAG[T].RangeNodes\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [RangeNodes](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L450\u003e)\n\n```go\nfunc (g *DAG[T]) RangeNodes(fn func(n *GraphNode[T]) bool)\n```\n\nRangeNodes iterates over all nodes in the graph\n\n\u003ca name=\"DAG[T].SetNode\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [SetNode](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L366\u003e)\n\n```go\nfunc (g *DAG[T]) SetNode(node Node) *GraphNode[T]\n```\n\nSetNode sets a node in the graph \\- it will use the node's ID as the key and overwrite any existing node with the same ID\n\n\u003ca name=\"DAG[T].Size\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [Size](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L412\u003e)\n\n```go\nfunc (g *DAG[T]) Size() (int, int)\n```\n\nSize returns the number of nodes and edges in the graph\n\n\u003ca name=\"DAG[T].TopologicalSort\"\u003e\u003c/a\u003e\n### func \\(\\*DAG\\[T\\]\\) [TopologicalSort](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L682\u003e)\n\n```go\nfunc (g *DAG[T]) TopologicalSort(reverse bool) ([]*GraphNode[T], error)\n```\n\n\n\n\u003ca name=\"DagOpt\"\u003e\u003c/a\u003e\n## type [DagOpt](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L336\u003e)\n\nDagOpt is an option for configuring a DAG\n\n```go\ntype DagOpt func(*dagOpts)\n```\n\n\u003ca name=\"WithVizualization\"\u003e\u003c/a\u003e\n### func [WithVizualization](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L339\u003e)\n\n```go\nfunc WithVizualization() DagOpt\n```\n\nWithVizualization enables graphviz visualization on the DAG\n\n\u003ca name=\"GraphEdge\"\u003e\u003c/a\u003e\n## type [GraphEdge](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L63-L75\u003e)\n\nGraphEdge is a relationship between two nodes\n\n```go\ntype GraphEdge[T Node] struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"GraphEdge[T].From\"\u003e\u003c/a\u003e\n### func \\(\\*GraphEdge\\[T\\]\\) [From](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L88\u003e)\n\n```go\nfunc (n *GraphEdge[T]) From() *GraphNode[T]\n```\n\nFrom returns the from node of the edge\n\n\u003ca name=\"GraphEdge[T].ID\"\u003e\u003c/a\u003e\n### func \\(\\*GraphEdge\\[T\\]\\) [ID](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L78\u003e)\n\n```go\nfunc (n *GraphEdge[T]) ID() string\n```\n\nID returns the unique identifier of the node\n\n\u003ca name=\"GraphEdge[T].Metadata\"\u003e\u003c/a\u003e\n### func \\(\\*GraphEdge\\[T\\]\\) [Metadata](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L83\u003e)\n\n```go\nfunc (n *GraphEdge[T]) Metadata() map[string]string\n```\n\nMetadata returns the metadata of the node\n\n\u003ca name=\"GraphEdge[T].Relationship\"\u003e\u003c/a\u003e\n### func \\(\\*GraphEdge\\[T\\]\\) [Relationship](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L98\u003e)\n\n```go\nfunc (n *GraphEdge[T]) Relationship() string\n```\n\nRelationship returns the relationship between the two nodes\n\n\u003ca name=\"GraphEdge[T].SetMetadata\"\u003e\u003c/a\u003e\n### func \\(\\*GraphEdge\\[T\\]\\) [SetMetadata](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L103\u003e)\n\n```go\nfunc (n *GraphEdge[T]) SetMetadata(metadata map[string]string)\n```\n\nSetMetadata sets the metadata of the node\n\n\u003ca name=\"GraphEdge[T].To\"\u003e\u003c/a\u003e\n### func \\(\\*GraphEdge\\[T\\]\\) [To](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L93\u003e)\n\n```go\nfunc (n *GraphEdge[T]) To() *GraphNode[T]\n```\n\nTo returns the to node of the edge\n\n\u003ca name=\"GraphNode\"\u003e\u003c/a\u003e\n## type [GraphNode](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L120-L126\u003e)\n\nGraphNode is a node in the graph. It can be connected to other nodes via edges.\n\n```go\ntype GraphNode[T Node] struct {\n    Node\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"GraphNode[T].Ancestors\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [Ancestors](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L258\u003e)\n\n```go\nfunc (n *GraphNode[T]) Ancestors(fn func(node *GraphNode[T]) bool)\n```\n\nAncestors returns the ancestors of the current node\n\n\u003ca name=\"GraphNode[T].BFS\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [BFS](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L134\u003e)\n\n```go\nfunc (n *GraphNode[T]) BFS(ctx context.Context, reverse bool, fn GraphSearchFunc[T]) error\n```\n\nBFS performs a breadth\\-first search on the graph starting from the current node\n\n\u003ca name=\"GraphNode[T].DFS\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [DFS](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L129\u003e)\n\n```go\nfunc (n *GraphNode[T]) DFS(ctx context.Context, reverse bool, fn GraphSearchFunc[T]) error\n```\n\nDFS performs a depth\\-first search on the graph starting from the current node\n\n\u003ca name=\"GraphNode[T].Descendants\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [Descendants](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L280\u003e)\n\n```go\nfunc (n *GraphNode[T]) Descendants(fn func(node *GraphNode[T]) bool)\n```\n\nDescendants returns the descendants of the current node\n\n\u003ca name=\"GraphNode[T].EdgesFrom\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [EdgesFrom](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L140\u003e)\n\n```go\nfunc (n *GraphNode[T]) EdgesFrom(relationship string, fn func(e *GraphEdge[T]) bool)\n```\n\nEdgesFrom iterates over the edges from the current node to other nodes with the given relationship. If the relationship is empty, all relationships will be iterated over.\n\n\u003ca name=\"GraphNode[T].EdgesTo\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [EdgesTo](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L153\u003e)\n\n```go\nfunc (n *GraphNode[T]) EdgesTo(relationship string, fn func(e *GraphEdge[T]) bool)\n```\n\nEdgesTo iterates over the edges from other nodes to the current node with the given relationship. If the relationship is empty, all relationships will be iterated over.\n\n\u003ca name=\"GraphNode[T].Graph\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [Graph](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L253\u003e)\n\n```go\nfunc (n *GraphNode[T]) Graph() *DAG[T]\n```\n\nDirectedGraph returns the graph the node belongs to\n\n\u003ca name=\"GraphNode[T].IsConnectedTo\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [IsConnectedTo](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L302\u003e)\n\n```go\nfunc (n *GraphNode[T]) IsConnectedTo(node *GraphNode[T]) bool\n```\n\nIsConnectedTo returns true if the current node is connected to the given node in any direction\n\n\u003ca name=\"GraphNode[T].Remove\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [Remove](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L236\u003e)\n\n```go\nfunc (n *GraphNode[T]) Remove() error\n```\n\nRemove removes the current node from the graph\n\n\u003ca name=\"GraphNode[T].RemoveEdge\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [RemoveEdge](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L216\u003e)\n\n```go\nfunc (n *GraphNode[T]) RemoveEdge(edgeID string)\n```\n\nRemoveEdge removes an edge from the current node by edgeID\n\n\u003ca name=\"GraphNode[T].SetEdge\"\u003e\u003c/a\u003e\n### func \\(\\*GraphNode\\[T\\]\\) [SetEdge](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L168\u003e)\n\n```go\nfunc (n *GraphNode[T]) SetEdge(relationship string, toNode Node, metadata map[string]string) (*GraphEdge[T], error)\n```\n\nSetEdge sets an edge from the current node to the node with the given nodeID. If the nodeID does not exist, an error is returned. If the edgeID is empty, a unique id will be generated. If the metadata is nil, an empty map will be used.\n\n\u003ca name=\"GraphSearchFunc\"\u003e\u003c/a\u003e\n## type [GraphSearchFunc](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L457\u003e)\n\nGraphSearchFunc is a function that is called on each node in the graph during a search\n\n```go\ntype GraphSearchFunc[T Node] func(ctx context.Context, relationship string, node *GraphNode[T]) bool\n```\n\n\u003ca name=\"HashMap\"\u003e\u003c/a\u003e\n## type [HashMap](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L752-L754\u003e)\n\nHashMap is a thread safe map\n\n```go\ntype HashMap[K comparable, V any] struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"NewHashMap\"\u003e\u003c/a\u003e\n### func [NewHashMap](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L745\u003e)\n\n```go\nfunc NewHashMap[K comparable, V any]() *HashMap[K, V]\n```\n\nNewHashMap creates a new generic hash map\n\n\u003ca name=\"HashMap[K, V].Clear\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Clear](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L792\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Clear()\n```\n\nClear clears the map\n\n\u003ca name=\"HashMap[K, V].Delete\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Delete](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L781\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Delete(key K)\n```\n\nDelete deletes the key from the map\n\n\u003ca name=\"HashMap[K, V].Exists\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Exists](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L786\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Exists(key K) bool\n```\n\nExists returns true if the key exists in the map\n\n\u003ca name=\"HashMap[K, V].Filter\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Filter](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L827\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Filter(f func(key K, value V) bool) *HashMap[K, V]\n```\n\nFilter returns a new hashmap with the values that return true from the function\n\n\u003ca name=\"HashMap[K, V].Get\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Get](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L767\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Get(key K) (V, bool)\n```\n\nGet gets the value from the key\n\n\u003ca name=\"HashMap[K, V].Keys\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Keys](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L800\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Keys() []K\n```\n\nKeys returns a copy of the keys in the map as a slice\n\n\u003ca name=\"HashMap[K, V].Len\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Len](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L757\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Len() int\n```\n\nLen returns the length of the map\n\n\u003ca name=\"HashMap[K, V].Map\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Map](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L839\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Map() map[K]V\n```\n\nMap returns a copy of the hashmap as a map\\[string\\]T\n\n\u003ca name=\"HashMap[K, V].Range\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Range](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L820\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Range(f func(key K, value V) bool)\n```\n\nRange ranges over the map with a function until false is returned\n\n\u003ca name=\"HashMap[K, V].Set\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Set](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L776\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Set(key K, value V)\n```\n\nSet sets the key to the value\n\n\u003ca name=\"HashMap[K, V].Values\"\u003e\u003c/a\u003e\n### func \\(\\*HashMap\\[K, V\\]\\) [Values](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L810\u003e)\n\n```go\nfunc (n *HashMap[K, V]) Values() []V\n```\n\nValues returns a copy of the values in the map as a slice\n\n\u003ca name=\"Node\"\u003e\u003c/a\u003e\n## type [Node](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L110-L117\u003e)\n\nNode is a node in the graph. It can be connected to other nodes via edges.\n\n```go\ntype Node interface {\n    // ID returns the unique identifier of the node\n    ID() string\n    // Metadata returns the metadata of the node\n    Metadata() map[string]string\n    // SetMetadata sets the metadata of the node\n    SetMetadata(metadata map[string]string)\n}\n```\n\n\u003ca name=\"PriorityQueue\"\u003e\u003c/a\u003e\n## type [PriorityQueue](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L855-L858\u003e)\n\nPriorityQueue is a thread safe priority queue\n\n```go\ntype PriorityQueue[T any] struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"NewPriorityQueue\"\u003e\u003c/a\u003e\n### func [NewPriorityQueue](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L861\u003e)\n\n```go\nfunc NewPriorityQueue[T any]() *PriorityQueue[T]\n```\n\nNewPriorityQueue creates a new priority queue\n\n\u003ca name=\"PriorityQueue[T].Len\"\u003e\u003c/a\u003e\n### func \\(\\*PriorityQueue\\[T\\]\\) [Len](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L883\u003e)\n\n```go\nfunc (q *PriorityQueue[T]) Len() int\n```\n\nLen returns the length of the queue\n\n\u003ca name=\"PriorityQueue[T].Peek\"\u003e\u003c/a\u003e\n### func \\(\\*PriorityQueue\\[T\\]\\) [Peek](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L912\u003e)\n\n```go\nfunc (q *PriorityQueue[T]) Peek() (T, bool)\n```\n\nPeek returns the next item in the queue without removing it\n\n\u003ca name=\"PriorityQueue[T].Pop\"\u003e\u003c/a\u003e\n### func \\(\\*PriorityQueue\\[T\\]\\) [Pop](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L900\u003e)\n\n```go\nfunc (q *PriorityQueue[T]) Pop() (T, bool)\n```\n\nPop pops an item off the queue\n\n\u003ca name=\"PriorityQueue[T].Push\"\u003e\u003c/a\u003e\n### func \\(\\*PriorityQueue\\[T\\]\\) [Push](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L890\u003e)\n\n```go\nfunc (q *PriorityQueue[T]) Push(item T, weight float64)\n```\n\nPush pushes an item onto the queue\n\n\u003ca name=\"PriorityQueue[T].UpdatePriority\"\u003e\u003c/a\u003e\n### func \\(\\*PriorityQueue\\[T\\]\\) [UpdatePriority](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L868\u003e)\n\n```go\nfunc (q *PriorityQueue[T]) UpdatePriority(value T, priority float64)\n```\n\n\n\n\u003ca name=\"Queue\"\u003e\u003c/a\u003e\n## type [Queue](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L996-L999\u003e)\n\nQueue is a thread safe non\\-blocking queue\n\n```go\ntype Queue[T any] struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"NewQueue\"\u003e\u003c/a\u003e\n### func [NewQueue](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1002\u003e)\n\n```go\nfunc NewQueue[T any]() *Queue[T]\n```\n\nNewQueue returns a new Queue\n\n\u003ca name=\"Queue[T].Len\"\u003e\u003c/a\u003e\n### func \\(\\*Queue\\[T\\]\\) [Len](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1029\u003e)\n\n```go\nfunc (s *Queue[T]) Len() int\n```\n\nLen returns the length of the queue\n\n\u003ca name=\"Queue[T].Peek\"\u003e\u003c/a\u003e\n### func \\(\\*Queue\\[T\\]\\) [Peek](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1036\u003e)\n\n```go\nfunc (s *Queue[T]) Peek() (T, bool)\n```\n\nPeek returns the next item in the queue without removing it\n\n\u003ca name=\"Queue[T].Pop\"\u003e\u003c/a\u003e\n### func \\(\\*Queue\\[T\\]\\) [Pop](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1015\u003e)\n\n```go\nfunc (s *Queue[T]) Pop() (T, bool)\n```\n\nPop and return top element of Queue. Return false if Queue is empty.\n\n\u003ca name=\"Queue[T].Push\"\u003e\u003c/a\u003e\n### func \\(\\*Queue\\[T\\]\\) [Push](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1008\u003e)\n\n```go\nfunc (s *Queue[T]) Push(f T)\n```\n\nPush a new value onto the Queue\n\n\u003ca name=\"Queue[T].Range\"\u003e\u003c/a\u003e\n### func \\(\\*Queue\\[T\\]\\) [Range](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1046\u003e)\n\n```go\nfunc (q *Queue[T]) Range(fn func(element T) bool)\n```\n\nRange executes a provided function once for each Queue element until it returns false or the Queue is empty.\n\n\u003ca name=\"Queue[T].RangeUntil\"\u003e\u003c/a\u003e\n### func \\(\\*Queue\\[T\\]\\) [RangeUntil](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1060\u003e)\n\n```go\nfunc (q *Queue[T]) RangeUntil(fn func(element T) bool, done chan struct{})\n```\n\nRangeUntil executes a provided function once for each Queue element until it returns false or a value is sent on the done channel. Use this function when you want to continuously process items from the queue until a done signal is received.\n\n\u003ca name=\"Set\"\u003e\u003c/a\u003e\n## type [Set](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1186-L1189\u003e)\n\nSet is a basic thread\\-safe Set implementation.\n\n```go\ntype Set[T comparable] struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"NewSet\"\u003e\u003c/a\u003e\n### func [NewSet](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1192\u003e)\n\n```go\nfunc NewSet[T comparable]() *Set[T]\n```\n\nNewSet returns a new Set with the given initial size.\n\n\u003ca name=\"Set[T].Add\"\u003e\u003c/a\u003e\n### func \\(\\*Set\\[T\\]\\) [Add](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1198\u003e)\n\n```go\nfunc (s *Set[T]) Add(val T)\n```\n\nAdd adds an element to the Set.\n\n\u003ca name=\"Set[T].Contains\"\u003e\u003c/a\u003e\n### func \\(\\*Set\\[T\\]\\) [Contains](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1212\u003e)\n\n```go\nfunc (s *Set[T]) Contains(val T) bool\n```\n\nContains returns true if the Set contains the element.\n\n\u003ca name=\"Set[T].Len\"\u003e\u003c/a\u003e\n### func \\(\\*Set\\[T\\]\\) [Len](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1231\u003e)\n\n```go\nfunc (s *Set[T]) Len() int\n```\n\nLen returns the number of elements in the Set.\n\n\u003ca name=\"Set[T].Range\"\u003e\u003c/a\u003e\n### func \\(\\*Set\\[T\\]\\) [Range](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1220\u003e)\n\n```go\nfunc (s *Set[T]) Range(fn func(element T) bool)\n```\n\nRange executes a provided function once for each Set element until it returns false.\n\n\u003ca name=\"Set[T].Remove\"\u003e\u003c/a\u003e\n### func \\(\\*Set\\[T\\]\\) [Remove](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1205\u003e)\n\n```go\nfunc (s *Set[T]) Remove(val T)\n```\n\nRemove removes an element from the Set.\n\n\u003ca name=\"Set[T].Sort\"\u003e\u003c/a\u003e\n### func \\(\\*Set\\[T\\]\\) [Sort](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1249\u003e)\n\n```go\nfunc (s *Set[T]) Sort(lessFunc func(i T, j T) bool) []T\n```\n\nSort returns the values of the set as an array sorted by the provided less function\n\n\u003ca name=\"Set[T].Values\"\u003e\u003c/a\u003e\n### func \\(\\*Set\\[T\\]\\) [Values](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1238\u003e)\n\n```go\nfunc (s *Set[T]) Values() []T\n```\n\nValues returns the values of the set as an array\n\n\u003ca name=\"Stack\"\u003e\u003c/a\u003e\n## type [Stack](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1084-L1087\u003e)\n\nStack is a basic LIFO Stack\n\n```go\ntype Stack[T any] struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"NewStack\"\u003e\u003c/a\u003e\n### func [NewStack](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1078\u003e)\n\n```go\nfunc NewStack[T any]() *Stack[T]\n```\n\nNewStack returns a new Stack instance\n\n\u003ca name=\"Stack[T].Clear\"\u003e\u003c/a\u003e\n### func \\(\\*Stack\\[T\\]\\) [Clear](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1130\u003e)\n\n```go\nfunc (s *Stack[T]) Clear()\n```\n\nClear removes all elements from the Stack\n\n\u003ca name=\"Stack[T].Len\"\u003e\u003c/a\u003e\n### func \\(\\*Stack\\[T\\]\\) [Len](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1166\u003e)\n\n```go\nfunc (s *Stack[T]) Len() int\n```\n\nLen returns the number of elements in the Stack.\n\n\u003ca name=\"Stack[T].Peek\"\u003e\u003c/a\u003e\n### func \\(\\*Stack\\[T\\]\\) [Peek](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1173\u003e)\n\n```go\nfunc (s *Stack[T]) Peek() (T, bool)\n```\n\nPeek returns the top element of the Stack without removing it. Return false if Stack is empty.\n\n\u003ca name=\"Stack[T].Pop\"\u003e\u003c/a\u003e\n### func \\(\\*Stack\\[T\\]\\) [Pop](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1116\u003e)\n\n```go\nfunc (s *Stack[T]) Pop() (T, bool)\n```\n\nPop removes and return top element of Stack. Return false if Stack is empty.\n\n\u003ca name=\"Stack[T].Push\"\u003e\u003c/a\u003e\n### func \\(\\*Stack\\[T\\]\\) [Push](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1109\u003e)\n\n```go\nfunc (s *Stack[T]) Push(f T)\n```\n\nPush a new value onto the Stack \\(LIFO\\)\n\n\u003ca name=\"Stack[T].Range\"\u003e\u003c/a\u003e\n### func \\(\\*Stack\\[T\\]\\) [Range](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1137\u003e)\n\n```go\nfunc (s *Stack[T]) Range(fn func(element T) bool)\n```\n\nRange executes a provided function once for each Stack element until it returns false.\n\n\u003ca name=\"Stack[T].RangeUntil\"\u003e\u003c/a\u003e\n### func \\(\\*Stack\\[T\\]\\) [RangeUntil](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1091\u003e)\n\n```go\nfunc (s *Stack[T]) RangeUntil(fn func(element T) bool, done chan struct{})\n```\n\nRangeUntil executes a provided function once after calling Pop on the stack until the function returns false or a value is sent on the done channel. Use this function when you want to continuously process items from the stack until a done signal is received.\n\n\u003ca name=\"Stack[T].Sort\"\u003e\u003c/a\u003e\n### func \\(\\*Stack\\[T\\]\\) [Sort](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1157\u003e)\n\n```go\nfunc (s *Stack[T]) Sort(lessFunc func(i T, j T) bool) []T\n```\n\nSort returns the values of the stack as an array sorted by the provided less function\n\n\u003ca name=\"Stack[T].Values\"\u003e\u003c/a\u003e\n### func \\(\\*Stack\\[T\\]\\) [Values](\u003chttps://github.com/autom8ter/dagger/blob/main/dagger.go#L1150\u003e)\n\n```go\nfunc (s *Stack[T]) Values() []T\n```\n\nValues returns the values of the stack as an array\n\nGenerated by [gomarkdoc](\u003chttps://github.com/princjef/gomarkdoc\u003e)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautom8ter%2Fdagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautom8ter%2Fdagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautom8ter%2Fdagger/lists"}