explore

package
v0.0.67 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0, NCSA Imports: 6 Imported by: 0

Documentation

Overview

Package explore provides a high-performance table-based implementation of the ExploreService defined in kythe/proto/explore.proto.

Table format:

<parent ticket>   -> srvpb.Relatives (children)
<child ticket>    -> srvpb.Relatives (parents)
<called ticket>   -> srvpb.Callgraph (callers)
<calling ticket>  -> srvpb.Callgraph (callees)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tables

type Tables struct {
	// ParentToChildren is a table of srvpb.Relatives keyed by parent ticket.
	ParentToChildren table.ProtoLookup

	// ChildToParents is a table of srvpb.Relatives keyed by child ticket.
	ChildToParents table.ProtoLookup

	// FunctionToCallers is a table of srvpb.Callgraph keyed by function ticket
	// that points to the callers of the specified function.
	FunctionToCallers table.ProtoLookup

	// FunctionToCallees is a table of srvpb.Callgraph keyed by function ticket
	// that points to the callees of the specified function.
	FunctionToCallees table.ProtoLookup
}

Tables implements the explore.Service interface using separate static lookup tables for each API component.

func (*Tables) Callees

func (t *Tables) Callees(ctx context.Context, req *epb.CalleesRequest) (*epb.CalleesReply, error)

Callees returns the callees of a specified function (that is, what functions this function calls), as a directed graph.

func (*Tables) Callers

func (t *Tables) Callers(ctx context.Context, req *epb.CallersRequest) (*epb.CallersReply, error)

Callers returns the callers of a specified function, as a directed graph.

func (*Tables) Children

func (t *Tables) Children(ctx context.Context, req *epb.ChildrenRequest) (*epb.ChildrenReply, error)

Children returns the children of a specified node (for example, the classes contained in a file, or the functions contained in a class).

func (*Tables) Parameters

func (t *Tables) Parameters(ctx context.Context, req *epb.ParametersRequest) (*epb.ParametersReply, error)

Parameters returns the parameters of a specified function. TODO: not yet implemented

func (*Tables) Parents

func (t *Tables) Parents(ctx context.Context, req *epb.ParentsRequest) (*epb.ParentsReply, error)

Parents returns the parents of a specified node (for example, the file for a class, or the class for a function). Note: in some cases a node may have more than one parent.

func (*Tables) TypeHierarchy

func (t *Tables) TypeHierarchy(ctx context.Context, req *epb.TypeHierarchyRequest) (*epb.TypeHierarchyReply, error)

TypeHierarchy returns the hierarchy (supertypes and subtypes, including implementations) of a specified type, as a directed acyclic graph. TODO: not yet implemented

Jump to

Keyboard shortcuts

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