xrefs

package
v0.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2016 License: Apache-2.0 Imports: 17 Imported by: 6

Documentation

Overview

Package xrefs provides a high-performance table-based implementation of the xrefs.Service.

Table format:

edgeSets:<ticket>      -> srvpb.PagedEdgeSet
edgePages:<page_key>   -> srvpb.EdgePage
decor:<ticket>         -> srvpb.FileDecorations
xrefs:<ticket>         -> srvpb.PagedCrossReferences
xrefPages:<page_key>   -> srvpb.PagedCrossReferences_Page

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrossReferencesKey added in v0.0.17

func CrossReferencesKey(ticket string) []byte

CrossReferencesKey returns the cross-references CombinedTable key for the given node ticket.

func CrossReferencesPageKey added in v0.0.17

func CrossReferencesPageKey(key string) []byte

CrossReferencesPageKey returns the cross-references page CombinedTable key for the given key.

func DecorationsKey

func DecorationsKey(ticket string) []byte

DecorationsKey returns the decorations CombinedTable key for the given source location ticket.

func EdgePageKey added in v0.0.9

func EdgePageKey(key string) []byte

EdgePageKey returns the edgepage CombinedTable key for the given key.

func EdgeSetKey

func EdgeSetKey(ticket string) []byte

EdgeSetKey returns the edgeset CombinedTable key for the given source ticket.

Types

type SplitTable added in v0.0.9

type SplitTable struct {
	// Edges is a table of srvpb.PagedEdgeSets keyed by their source tickets.
	Edges table.ProtoBatch

	// EdgePages is a table of srvpb.EdgePages keyed by their page keys.
	EdgePages table.Proto

	// Decorations is a table of srvpb.FileDecorations keyed by their source
	// location tickets.
	Decorations table.Proto

	// CrossReferences is a table of srvpb.PagedCrossReferences keyed by their
	// source node tickets.
	CrossReferences table.Proto

	// CrossReferencePages is a table of srvpb.PagedCrossReferences_Pages keyed by
	// their page keys.
	CrossReferencePages table.Proto
}

SplitTable implements the xrefs Service interface using separate static lookup tables for each API component.

type Table

type Table struct {
	// contains filtered or unexported fields
}

Table implements the xrefs Service interface using static lookup tables.

func NewCombinedTable added in v0.0.9

func NewCombinedTable(t table.ProtoBatch) *Table

NewCombinedTable returns a table for the given combined xrefs lookup table. The table's keys are expected to be constructed using only the EdgeSetKey, EdgePageKey, and DecorationsKey functions.

func NewSplitTable added in v0.0.9

func NewSplitTable(c *SplitTable) *Table

NewSplitTable returns a table based on the given serving tables for each API component.

func (*Table) CrossReferences added in v0.0.25

func (t *Table) CrossReferences(ctx context.Context, req *xpb.CrossReferencesRequest) (*xpb.CrossReferencesReply, error)

CrossReferences implements part of the xrefs.Service interface.

func (*Table) Decorations

func (t *Table) Decorations(ctx context.Context, req *xpb.DecorationsRequest) (*xpb.DecorationsReply, error)

Decorations implements part of the xrefs Service interface.

func (*Table) Documentation added in v0.0.25

func (t *Table) Documentation(ctx context.Context, req *xpb.DocumentationRequest) (*xpb.DocumentationReply, error)

Callers implements part of the xrefs Service interface.

func (*Table) Edges

func (t *Table) Edges(ctx context.Context, req *xpb.EdgesRequest) (*xpb.EdgesReply, error)

Edges implements part of the xrefs Service interface.

func (*Table) Nodes

func (t *Table) Nodes(ctx context.Context, req *xpb.NodesRequest) (*xpb.NodesReply, error)

Nodes implements part of the xrefs Service interface.

Directories

Path Synopsis
Package assemble provides functions to build the various components (nodes, edges, and decorations) of an xrefs serving table.
Package assemble provides functions to build the various components (nodes, edges, and decorations) of an xrefs serving table.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL