Documentation
¶
Overview ¶
Package inmem provides an in-memory graph implementation.
Index ¶
- type Graph
- func (g *Graph) Edges(fromID, toID uuid.UUID, updatedBefore time.Time) (graph.EdgeIterator, error)
- func (g *Graph) FindLink(id uuid.UUID) (*graph.Link, error)
- func (g *Graph) Links(fromID, toID uuid.UUID, retrievedBefore time.Time) (graph.LinkIterator, error)
- func (g *Graph) RemoveStaleEdges(fromID uuid.UUID, updatedBefore time.Time) error
- func (g *Graph) UpsertEdge(edge *graph.Edge) error
- func (g *Graph) UpsertLink(link *graph.Link) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph implements an in-memory link graph that can be concurrently accessed by multiple clients.
func (*Graph) Edges ¶
Edges returns an iterator for the set of edges whose source vertex IDs belong to the [fromID, toID) range and were updated before the provided timestamp.
func (*Graph) Links ¶
func (g *Graph) Links(fromID, toID uuid.UUID, retrievedBefore time.Time) (graph.LinkIterator, error)
Links returns an iterator for the set of links whose IDs belong to the [fromID, toID) range and were retrieved before the provided timestamp.
func (*Graph) RemoveStaleEdges ¶
RemoveStaleEdges removes any edge that originates from the specified link ID and was updated before the specified timestamp.
func (*Graph) UpsertEdge ¶
UpsertEdge creates a new edge or updates an existing edge.