Documentation ¶
Overview ¶
Package graph provides a high-performance table-based implementation of the graph.Service.
Table format:
edgeSets:<ticket> -> srvpb.PagedEdgeSet edgePages:<page_key> -> srvpb.EdgePage
Index ¶
Constants ¶
const ColumnarTableKeyMarker = "kythe:columnar"
ColumnarTableKeyMarker is stored within a Kythe columnar table to differentiate it from the legacy combined table format.
Variables ¶
This section is empty.
Functions ¶
func EdgePageKey ¶
EdgePageKey returns the edgepage CombinedTable key for the given key.
func EdgeSetKey ¶
EdgeSetKey returns the edgeset CombinedTable key for the given source ticket.
Types ¶
type ColumnarTable ¶ added in v0.0.29
ColumnarTable implements an graph.Service backed by a columnar serving table.
func NewColumnarTable ¶ added in v0.0.29
func NewColumnarTable(t keyvalue.DB) *ColumnarTable
NewColumnarTable returns a table for the given columnar graph lookup table.
func (*ColumnarTable) Edges ¶ added in v0.0.29
func (c *ColumnarTable) Edges(ctx context.Context, req *gpb.EdgesRequest) (*gpb.EdgesReply, error)
Edges implements part of the graph.Service interface.
func (*ColumnarTable) Nodes ¶ added in v0.0.29
func (c *ColumnarTable) Nodes(ctx context.Context, req *gpb.NodesRequest) (*gpb.NodesReply, error)
Nodes implements part of the graph.Service interface.
type SplitTable ¶
type SplitTable struct { // Edges is a table of srvpb.PagedEdgeSets keyed by their source tickets. Edges table.Proto // EdgePages is a table of srvpb.EdgePages keyed by their page keys. EdgePages table.Proto }
SplitTable implements the graph Service interface using separate static lookup tables for each API component.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table implements the GraphService interface using static lookup tables.
func NewCombinedTable ¶
NewCombinedTable returns a table for the given combined graph lookup table. The table's keys are expected to be constructed using only the EdgeSetKey, EdgePageKey, and DecorationsKey functions.
func NewSplitTable ¶
func NewSplitTable(c *SplitTable) *Table
NewSplitTable returns a table based on the given serving tables for each API component.
func (*Table) Edges ¶
func (t *Table) Edges(ctx context.Context, req *gpb.EdgesRequest) (*gpb.EdgesReply, error)
Edges implements part of the graph Service interface.
func (*Table) Nodes ¶
func (t *Table) Nodes(ctx context.Context, req *gpb.NodesRequest) (*gpb.NodesReply, error)
Nodes implements part of the graph Service interface.