Documentation ¶
Index ¶
- type LinkGraphClient
- func (c *LinkGraphClient) Edges(fromID, toID uuid.UUID, updatedBefore time.Time) (graph.EdgeIterator, error)
- func (c *LinkGraphClient) Links(fromID, toID uuid.UUID, accessedBefore time.Time) (graph.LinkIterator, error)
- func (c *LinkGraphClient) RemoveStaleEdges(from uuid.UUID, updatedBefore time.Time) error
- func (c *LinkGraphClient) UpsertEdge(edge *graph.Edge) error
- func (c *LinkGraphClient) UpsertLink(link *graph.Link) error
- type LinkGraphServer
- func (s *LinkGraphServer) Edges(idRange *proto.Range, w proto.LinkGraph_EdgesServer) error
- func (s *LinkGraphServer) Links(idRange *proto.Range, w proto.LinkGraph_LinksServer) error
- func (s *LinkGraphServer) RemoveStaleEdges(_ context.Context, req *proto.RemoveStaleEdgesQuery) (*empty.Empty, error)
- func (s *LinkGraphServer) UpsertEdge(_ context.Context, req *proto.Edge) (*proto.Edge, error)
- func (s *LinkGraphServer) UpsertLink(_ context.Context, req *proto.Link) (*proto.Link, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkGraphClient ¶
type LinkGraphClient struct {
// contains filtered or unexported fields
}
LinkGraphClient provides an API compatible with the graph.Graph interface for accessing graph instances exposed by a remote gRPC server.
func NewLinkGraphClient ¶
func NewLinkGraphClient(ctx context.Context, rpcClient proto.LinkGraphClient) *LinkGraphClient
NewLinkGraphClient returns a new client instance that implements a subset of the graph.Graph interface by delegating methods to a graph instance exposed by a remote gRPC sever.
func (*LinkGraphClient) Edges ¶
func (c *LinkGraphClient) Edges(fromID, toID uuid.UUID, updatedBefore time.Time) (graph.EdgeIterator, error)
Edges returns an iterator for the set of edges whose source vertex IDs belong to the [fromID, toID) range and were last updated before the provided value.
func (*LinkGraphClient) Links ¶
func (c *LinkGraphClient) Links(fromID, toID uuid.UUID, accessedBefore time.Time) (graph.LinkIterator, error)
Links returns an iterator for the set of links whose IDs belong to the [fromID, toID) range and were last accessed before the provided value.
func (*LinkGraphClient) RemoveStaleEdges ¶
RemoveStaleEdges removes any edge that originates from the specified link ID and was updated before the specified timestamp.
func (*LinkGraphClient) UpsertEdge ¶
func (c *LinkGraphClient) UpsertEdge(edge *graph.Edge) error
UpsertEdge creates a new edge or updates an existing edge.
func (*LinkGraphClient) UpsertLink ¶
func (c *LinkGraphClient) UpsertLink(link *graph.Link) error
UpsertLink creates a new link or updates an existing link.
type LinkGraphServer ¶
type LinkGraphServer struct { proto.UnimplementedLinkGraphServer // contains filtered or unexported fields }
LinkGraphServer provides a gRPC layer for accessing a link graph.
func NewLinkGraphServer ¶
func NewLinkGraphServer(g graph.Graph) *LinkGraphServer
NewLinkGraphServer returns a new server instance that uses the provided graph as its backing store.
func (*LinkGraphServer) Edges ¶
func (s *LinkGraphServer) Edges(idRange *proto.Range, w proto.LinkGraph_EdgesServer) error
Edges streams the set of edges whose IDs belong to the specified partition range and were updated before the specified timestamp.
func (*LinkGraphServer) Links ¶
func (s *LinkGraphServer) Links(idRange *proto.Range, w proto.LinkGraph_LinksServer) error
Links streams the set of links whose IDs belong to the specified partition range and were accessed before the specified timestamp.
func (*LinkGraphServer) RemoveStaleEdges ¶
func (s *LinkGraphServer) RemoveStaleEdges(_ context.Context, req *proto.RemoveStaleEdgesQuery) (*empty.Empty, error)
RemoveStaleEdges removes any edge that originates from the specified link ID and was updated before the specified timestamp.
func (*LinkGraphServer) UpsertEdge ¶
UpsertEdge inserts or updates an edge.
func (*LinkGraphServer) UpsertLink ¶
UpsertLink inserts or updates a link.