xrefs

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2015 License: Apache-2.0 Imports: 15 Imported by: 6

Documentation

Overview

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

Table format:

nodes:<ticket>         -> srvpb.Node
edgeSets:<ticket>      -> srvpb.PagedEdgeSet
edgePages:<page_token> -> srvpb.EdgePage
decor:<ticket>         -> srvpb.FileDecorations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

func NewCombinedTable added in v0.0.9

func NewCombinedTable(t table.ProtoBatch) xrefs.Service

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

func NewSplitTable added in v0.0.9

func NewSplitTable(c *SplitTable) xrefs.Service

NewSplitTable returns an xrefs.Service based on the given serving tables for each API component.

func NodeKey

func NodeKey(ticket string) []byte

NodeKey returns the nodes CombinedTable key for the given ticket.

Types

type SplitTable added in v0.0.9

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

	// 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
}

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

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