Documentation ¶
Overview ¶
Package xrefs contains a simple implementation of the xrefs.Service interface backed by a graphstore.Service.
Index ¶
- func EnsureReverseEdges(ctx context.Context, gs graphstore.Service) error
- type GraphStoreService
- func (g *GraphStoreService) Callers(ctx context.Context, req *xpb.CallersRequest) (*xpb.CallersReply, error)
- func (g *GraphStoreService) CrossReferences(ctx context.Context, req *xpb.CrossReferencesRequest) (*xpb.CrossReferencesReply, error)
- func (g *GraphStoreService) Decorations(ctx context.Context, req *xpb.DecorationsRequest) (*xpb.DecorationsReply, error)
- func (g *GraphStoreService) Documentation(ctx context.Context, req *xpb.DocumentationRequest) (*xpb.DocumentationReply, error)
- func (g *GraphStoreService) Edges(ctx context.Context, req *xpb.EdgesRequest) (*xpb.EdgesReply, error)
- func (g *GraphStoreService) Nodes(ctx context.Context, req *xpb.NodesRequest) (*xpb.NodesReply, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureReverseEdges ¶
func EnsureReverseEdges(ctx context.Context, gs graphstore.Service) error
EnsureReverseEdges checks if gs contains reverse edges. If it doesn't, it will scan gs for all forward edges, adding a reverse for each back into the GraphStore. This is necessary for a GraphStoreService to work properly.
Types ¶
type GraphStoreService ¶
type GraphStoreService struct {
// contains filtered or unexported fields
}
A GraphStoreService partially implements the xrefs.Service interface directly using a graphstore.Service with stored reverse edges. This is a low-performance, simple alternative to creating the serving Table representation. TODO(schroederc): parallelize GraphStore calls
func NewGraphStoreService ¶
func NewGraphStoreService(gs graphstore.Service) *GraphStoreService
NewGraphStoreService returns a new GraphStoreService given an existing graphstore.Service.
func (*GraphStoreService) Callers ¶ added in v0.0.18
func (g *GraphStoreService) Callers(ctx context.Context, req *xpb.CallersRequest) (*xpb.CallersReply, error)
Callers implements part of the Service interface.
func (*GraphStoreService) CrossReferences ¶ added in v0.0.13
func (g *GraphStoreService) CrossReferences(ctx context.Context, req *xpb.CrossReferencesRequest) (*xpb.CrossReferencesReply, error)
CrossReferences implements part of the xrefs Service interface.
func (*GraphStoreService) Decorations ¶
func (g *GraphStoreService) Decorations(ctx context.Context, req *xpb.DecorationsRequest) (*xpb.DecorationsReply, error)
Decorations implements part of the Service interface.
func (*GraphStoreService) Documentation ¶ added in v0.0.21
func (g *GraphStoreService) Documentation(ctx context.Context, req *xpb.DocumentationRequest) (*xpb.DocumentationReply, error)
Documentation implements part of the Service interface.
func (*GraphStoreService) Edges ¶
func (g *GraphStoreService) Edges(ctx context.Context, req *xpb.EdgesRequest) (*xpb.EdgesReply, error)
Edges implements part of the Service interface.
func (*GraphStoreService) Nodes ¶
func (g *GraphStoreService) Nodes(ctx context.Context, req *xpb.NodesRequest) (*xpb.NodesReply, error)
Nodes implements part of the Service interface.