Documentation ¶
Index ¶
- type GraphClient
- func (c *GraphClient) Edges(fromID, toID uuid.UUID, updatedBefore time.Time) (graph.EdgeIterator, error)
- func (c *GraphClient) Links(fromID, toID uuid.UUID, accessedBefore time.Time) (graph.LinkIterator, error)
- func (c *GraphClient) RemoveStaleEdges(from uuid.UUID, updatedBefore time.Time) error
- func (c *GraphClient) UpsertEdge(edge *graph.Edge) error
- func (c *GraphClient) UpsertLink(link *graph.Link) error
- type GraphServer
- func (s *GraphServer) Edges(idRange *proto.Range, w proto.Graph_EdgesServer) error
- func (s *GraphServer) Links(idRange *proto.Range, w proto.Graph_LinksServer) error
- func (s *GraphServer) RemoveStaleEdges(_ context.Context, req *proto.RemoveStaleEdgesQuery) (*empty.Empty, error)
- func (s *GraphServer) UpsertEdge(_ context.Context, req *proto.Edge) (*proto.Edge, error)
- func (s *GraphServer) 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 GraphClient ¶
type GraphClient struct {
// contains filtered or unexported fields
}
GraphClient provides an API compatible with the graph.Graph interface for accessing graph instances exposed by a remote gRPC server.
func NewGraphClient ¶
func NewGraphClient(ctx context.Context, rpcClient proto.GraphClient) *GraphClient
NewGraphClient 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 server.
func (*GraphClient) Edges ¶
func (c *GraphClient) Edges(fromID, toID uuid.UUID, updatedBefore time.Time) (graph.EdgeIterator, error)
func (*GraphClient) Links ¶
func (c *GraphClient) Links(fromID, toID uuid.UUID, accessedBefore time.Time) (graph.LinkIterator, error)
func (*GraphClient) RemoveStaleEdges ¶
func (*GraphClient) UpsertEdge ¶
func (c *GraphClient) UpsertEdge(edge *graph.Edge) error
func (*GraphClient) UpsertLink ¶
func (c *GraphClient) UpsertLink(link *graph.Link) error
type GraphServer ¶
type GraphServer struct { proto.UnimplementedGraphServer // contains filtered or unexported fields }
GraphServer provides a gRPC layer for accessing a graph.
func NewGraphServer ¶
func NewGraphServer(g graph.Graph) *GraphServer
NewGraphServer returns a new server instance that uses the provided graph as its backing store.
func (*GraphServer) Edges ¶
func (s *GraphServer) Edges(idRange *proto.Range, w proto.Graph_EdgesServer) error
Edges streams the set of edges whose IDs belong to the specified partition range and were updated before the specified timestamp.
func (*GraphServer) Links ¶
func (s *GraphServer) Links(idRange *proto.Range, w proto.Graph_LinksServer) error
Links streams the set of links whose IDs belong to the specified partition range and were accessed before the specified timestamp.
func (*GraphServer) RemoveStaleEdges ¶
func (s *GraphServer) 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.