analysis

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: 5 Imported by: 0

Documentation

Overview

Package analysis defines interfaces used to locate and analyze compilation units and their inputs.

The CompilationAnalyzer interface represents a generic analysis process that processes kythe.proto.CompilationUnit messages and their associated inputs. The Fetcher interface expresses the ability to fetch required files from storage based on their corpus-relative paths and digests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompilationAnalyzer added in v0.0.8

type CompilationAnalyzer interface {
	// Analyze calls f on each analysis output resulting from the analysis of the
	// given apb.CompilationUnit.  If f returns an error, f is no longer called
	// and Analyze returns with the same error.
	Analyze(ctx context.Context, req *apb.AnalysisRequest, f OutputFunc) (*apb.AnalysisResult, error)
}

A CompilationAnalyzer processes compilation units and delivers output artifacts to a user-supplied callback function.

type Fetcher

type Fetcher interface {
	// Fetch retrieves the contents of a single file.  At least one of path and
	// digest must be provided; both are preferred.  The implementation may
	// return an error if both are not set.
	Fetch(path, digest string) ([]byte, error)
}

A Fetcher provides the ability to fetch file contents from storage.

type OutputFunc added in v0.0.8

type OutputFunc func(context.Context, *apb.AnalysisOutput) error

OutputFunc handles a single AnalysisOutput.

func EntryOutput added in v0.0.8

func EntryOutput(f func(context.Context, *spb.Entry) error) OutputFunc

EntryOutput returns an OutputFunc that unmarshals each output's value as an Entry and calls f on it.

Directories

Path Synopsis
Package driver contains a Driver implementation that sends analyses to a CompilationAnalyzer based on a Queue of compilations.
Package driver contains a Driver implementation that sends analyses to a CompilationAnalyzer based on a Queue of compilations.
Package local implements CompilationAnalyzer utilities for local analyses.
Package local implements CompilationAnalyzer utilities for local analyses.
Package proxy implements a wrapper that proxies an analysis request to a Kythe indexer that does not speak protocol buffers or RPCs.
Package proxy implements a wrapper that proxies an analysis request to a Kythe indexer that does not speak protocol buffers or RPCs.

Jump to

Keyboard shortcuts

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