analysis_proto

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: May 12, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package analysis_proto is a generated protocol buffer package.

It is generated from these files:

kythe/proto/analysis.proto

It has these top-level messages:

AnalysisRequest
AnalysisOutput
CompilationUnit
FilesRequest
FileInfo
FileData

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAnalysis = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAnalysis   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterCompilationAnalyzerServer

func RegisterCompilationAnalyzerServer(s *grpc.Server, srv CompilationAnalyzerServer)

func RegisterFileDataServiceServer

func RegisterFileDataServiceServer(s *grpc.Server, srv FileDataServiceServer)

Types

type AnalysisOutput

type AnalysisOutput struct {
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}

AnalysisOutput contains an output artifact for the current analysis taking place. A given analysis may not produce any outputs. It is okay for an indexer to send an empty AnalysisOutput message if needed to keep the RPC channel alive; the driver must correctly handle this.

func (*AnalysisOutput) Descriptor added in v0.0.21

func (*AnalysisOutput) Descriptor() ([]byte, []int)

func (*AnalysisOutput) Marshal added in v0.0.17

func (m *AnalysisOutput) Marshal() (data []byte, err error)

func (*AnalysisOutput) MarshalTo added in v0.0.17

func (m *AnalysisOutput) MarshalTo(data []byte) (int, error)

func (*AnalysisOutput) ProtoMessage

func (*AnalysisOutput) ProtoMessage()

func (*AnalysisOutput) Reset

func (m *AnalysisOutput) Reset()

func (*AnalysisOutput) Size added in v0.0.17

func (m *AnalysisOutput) Size() (n int)

func (*AnalysisOutput) String

func (m *AnalysisOutput) String() string

func (*AnalysisOutput) Unmarshal added in v0.0.17

func (m *AnalysisOutput) Unmarshal(data []byte) error

type AnalysisRequest

type AnalysisRequest struct {
	// The compilation to analyze.
	Compilation *CompilationUnit `protobuf:"bytes,1,opt,name=compilation" json:"compilation,omitempty"`
	// The address of a file data service to use.  If this is provided, it should
	// be used in preference to any other file data service the analyzer may know
	// about for this compilation.
	FileDataService string `protobuf:"bytes,2,opt,name=file_data_service,proto3" json:"file_data_service,omitempty"`
}

An AnalysisRequest instructs an analyzer to perform an analysis on a single CompilationUnit.

func (*AnalysisRequest) Descriptor added in v0.0.21

func (*AnalysisRequest) Descriptor() ([]byte, []int)

func (*AnalysisRequest) GetCompilation

func (m *AnalysisRequest) GetCompilation() *CompilationUnit

func (*AnalysisRequest) Marshal added in v0.0.17

func (m *AnalysisRequest) Marshal() (data []byte, err error)

func (*AnalysisRequest) MarshalTo added in v0.0.17

func (m *AnalysisRequest) MarshalTo(data []byte) (int, error)

func (*AnalysisRequest) ProtoMessage

func (*AnalysisRequest) ProtoMessage()

func (*AnalysisRequest) Reset

func (m *AnalysisRequest) Reset()

func (*AnalysisRequest) Size added in v0.0.17

func (m *AnalysisRequest) Size() (n int)

func (*AnalysisRequest) String

func (m *AnalysisRequest) String() string

func (*AnalysisRequest) Unmarshal added in v0.0.17

func (m *AnalysisRequest) Unmarshal(data []byte) error

type CompilationAnalyzerClient

type CompilationAnalyzerClient interface {
	// Analyze is the main entry point for the analysis driver to send work to the
	// analyzer.  The analysis may produce many outputs which will be streamed as
	// framed AnalysisOutput messages.
	//
	// A driver may choose to retry analyses that return RPC errors.  It should
	// not retry analyses that are reported as finished unless it is necessary to
	// recover from an external production issue.
	Analyze(ctx context.Context, in *AnalysisRequest, opts ...grpc.CallOption) (CompilationAnalyzer_AnalyzeClient, error)
}

func NewCompilationAnalyzerClient

func NewCompilationAnalyzerClient(cc *grpc.ClientConn) CompilationAnalyzerClient

type CompilationAnalyzerServer

type CompilationAnalyzerServer interface {
	// Analyze is the main entry point for the analysis driver to send work to the
	// analyzer.  The analysis may produce many outputs which will be streamed as
	// framed AnalysisOutput messages.
	//
	// A driver may choose to retry analyses that return RPC errors.  It should
	// not retry analyses that are reported as finished unless it is necessary to
	// recover from an external production issue.
	Analyze(*AnalysisRequest, CompilationAnalyzer_AnalyzeServer) error
}

type CompilationAnalyzer_AnalyzeClient

type CompilationAnalyzer_AnalyzeClient interface {
	Recv() (*AnalysisOutput, error)
	grpc.ClientStream
}

type CompilationAnalyzer_AnalyzeServer

type CompilationAnalyzer_AnalyzeServer interface {
	Send(*AnalysisOutput) error
	grpc.ServerStream
}

type CompilationUnit

type CompilationUnit struct {
	// The base VName for the compilation and any generated VNames from its
	// analysis. Generally, the `language` component designates the language of
	// the compilation's sources.
	VName *kythe_proto.VName `protobuf:"bytes,1,opt,name=v_name" json:"v_name,omitempty"`
	// The revision of the compilation.
	Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	// All files that might be touched in the course of this compilation.
	// Consumers of the CompilationUnit may not assume anything about the order
	// of the elements of this field.
	RequiredInput []*CompilationUnit_FileInput `protobuf:"bytes,3,rep,name=required_input" json:"required_input,omitempty"`
	// Set by the extractor to indicate that the original input had compile
	// errors. This is used to check validity of the sharded analysis.
	HasCompileErrors bool `protobuf:"varint,4,opt,name=has_compile_errors,proto3" json:"has_compile_errors,omitempty"`
	// The arguments to pass to a compiler tool for this compilation unit,
	// including the compiler executable, flags, and input files.
	Argument []string `protobuf:"bytes,5,rep,name=argument" json:"argument,omitempty"`
	// Of those files in `required_input`, the ones that this CompilationUnit
	// is intended to analyze. This is necessary to support languages like Go,
	// where a single translation unit may contain many source files that must all
	// be processed at once (while excluding source files that belong to other
	// CUs/packages, if any).
	SourceFile []string `protobuf:"bytes,6,rep,name=source_file" json:"source_file,omitempty"`
	// The output key of the CompilationUnit; for example, the object file that
	// it writes.  The output key for a compilation should match the path in the
	// FileInfo message of a dependent compilation that consumes its output.
	OutputKey string `protobuf:"bytes,7,opt,name=output_key,proto3" json:"output_key,omitempty"`
	// The absolute path of the current working directory where the build tool
	// was invoked.  During analysis, a file whose path has working_directory
	// plus a path separator as an exact prefix is considered accessible from
	// that same path without said prefix.  It is only necessary to set this
	// field if the build tool requires it.
	WorkingDirectory string `protobuf:"bytes,8,opt,name=working_directory,proto3" json:"working_directory,omitempty"`
	// For languages that make use of resource contexts (like C++), the context
	// that should be initially entered.
	// TODO(zarko): What is a "resource context"? Needs a clear definition and/or
	// a link to one.
	EntryContext string `protobuf:"bytes,9,opt,name=entry_context,proto3" json:"entry_context,omitempty"`
	// A collection of environment variables that the build environment expects
	// to be set.  As a rule, we only record variables here that must be set to
	// specific values for the build to work.  Users of this field may not assume
	// anything about the order of values; in particular the pipeline is free to
	// sort by name in order to canonicalize the message.
	Environment []*CompilationUnit_Env `protobuf:"bytes,10,rep,name=environment" json:"environment,omitempty"`
	// Per-language or per-tool details.
	Details []*google_protobuf.Any `protobuf:"bytes,11,rep,name=details" json:"details,omitempty"`
}

Describes a single unit of compilation.

func (*CompilationUnit) Descriptor added in v0.0.21

func (*CompilationUnit) Descriptor() ([]byte, []int)

func (*CompilationUnit) GetDetails

func (m *CompilationUnit) GetDetails() []*google_protobuf.Any

func (*CompilationUnit) GetEnvironment

func (m *CompilationUnit) GetEnvironment() []*CompilationUnit_Env

func (*CompilationUnit) GetRequiredInput

func (m *CompilationUnit) GetRequiredInput() []*CompilationUnit_FileInput

func (*CompilationUnit) GetVName

func (m *CompilationUnit) GetVName() *kythe_proto.VName

func (*CompilationUnit) Marshal added in v0.0.17

func (m *CompilationUnit) Marshal() (data []byte, err error)

func (*CompilationUnit) MarshalTo added in v0.0.17

func (m *CompilationUnit) MarshalTo(data []byte) (int, error)

func (*CompilationUnit) ProtoMessage

func (*CompilationUnit) ProtoMessage()

func (*CompilationUnit) Reset

func (m *CompilationUnit) Reset()

func (*CompilationUnit) Size added in v0.0.17

func (m *CompilationUnit) Size() (n int)

func (*CompilationUnit) String

func (m *CompilationUnit) String() string

func (*CompilationUnit) Unmarshal added in v0.0.17

func (m *CompilationUnit) Unmarshal(data []byte) error

type CompilationUnit_ContextDependentVersionColumn

type CompilationUnit_ContextDependentVersionColumn struct {
	// The byte offset into the file resource.
	Offset int32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	// The signature for the resulting context.
	LinkedContext string `protobuf:"bytes,2,opt,name=linked_context,proto3" json:"linked_context,omitempty"`
}

ContextDependentVersionColumn and ContextDependentVersionRow define a table that relates input contexts (keyed by a single source context per row) to tuples of (byte offset * linked context). When a FileInput F being processed in context C refers to another FileInput F' at offset O (perhaps because F has an #include directive at O) the context in which F' should be processed is the linked context derived from this table.

func (*CompilationUnit_ContextDependentVersionColumn) Descriptor added in v0.0.21

func (*CompilationUnit_ContextDependentVersionColumn) Marshal added in v0.0.17

func (m *CompilationUnit_ContextDependentVersionColumn) Marshal() (data []byte, err error)

func (*CompilationUnit_ContextDependentVersionColumn) MarshalTo added in v0.0.17

func (*CompilationUnit_ContextDependentVersionColumn) ProtoMessage

func (*CompilationUnit_ContextDependentVersionColumn) Reset

func (*CompilationUnit_ContextDependentVersionColumn) Size added in v0.0.17

func (*CompilationUnit_ContextDependentVersionColumn) String

func (*CompilationUnit_ContextDependentVersionColumn) Unmarshal added in v0.0.17

type CompilationUnit_ContextDependentVersionRow

type CompilationUnit_ContextDependentVersionRow struct {
	// The context to be applied to all columns.
	SourceContext string `protobuf:"bytes,1,opt,name=source_context,proto3" json:"source_context,omitempty"`
	// A map from byte offsets to linked contexts.
	Column []*CompilationUnit_ContextDependentVersionColumn `protobuf:"bytes,2,rep,name=column" json:"column,omitempty"`
	// If true, this version should always be processed regardless of any
	// claiming.
	AlwaysProcess bool `protobuf:"varint,3,opt,name=always_process,proto3" json:"always_process,omitempty"`
}

See ContextDependentVersionColumn for details. It is valid for a ContextDependentVersionRow to have no columns. In this case, the associated FileInput was seen to exist in some context C, but did not refer to any other FileInputs while in that context.

func (*CompilationUnit_ContextDependentVersionRow) Descriptor added in v0.0.21

func (*CompilationUnit_ContextDependentVersionRow) GetColumn

func (*CompilationUnit_ContextDependentVersionRow) Marshal added in v0.0.17

func (m *CompilationUnit_ContextDependentVersionRow) Marshal() (data []byte, err error)

func (*CompilationUnit_ContextDependentVersionRow) MarshalTo added in v0.0.17

func (m *CompilationUnit_ContextDependentVersionRow) MarshalTo(data []byte) (int, error)

func (*CompilationUnit_ContextDependentVersionRow) ProtoMessage

func (*CompilationUnit_ContextDependentVersionRow) Reset

func (*CompilationUnit_ContextDependentVersionRow) Size added in v0.0.17

func (*CompilationUnit_ContextDependentVersionRow) String

func (*CompilationUnit_ContextDependentVersionRow) Unmarshal added in v0.0.17

type CompilationUnit_Env

type CompilationUnit_Env struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

An Env message represents the name and value of a single environment variable in the build environment.

func (*CompilationUnit_Env) Descriptor added in v0.0.21

func (*CompilationUnit_Env) Descriptor() ([]byte, []int)

func (*CompilationUnit_Env) Marshal added in v0.0.17

func (m *CompilationUnit_Env) Marshal() (data []byte, err error)

func (*CompilationUnit_Env) MarshalTo added in v0.0.17

func (m *CompilationUnit_Env) MarshalTo(data []byte) (int, error)

func (*CompilationUnit_Env) ProtoMessage

func (*CompilationUnit_Env) ProtoMessage()

func (*CompilationUnit_Env) Reset

func (m *CompilationUnit_Env) Reset()

func (*CompilationUnit_Env) Size added in v0.0.17

func (m *CompilationUnit_Env) Size() (n int)

func (*CompilationUnit_Env) String

func (m *CompilationUnit_Env) String() string

func (*CompilationUnit_Env) Unmarshal added in v0.0.17

func (m *CompilationUnit_Env) Unmarshal(data []byte) error

type CompilationUnit_FileInput

type CompilationUnit_FileInput struct {
	// If set, overrides the `v_name` in the `CompilationUnit` for deriving
	// VNames during analysis.
	VName *kythe_proto.VName `protobuf:"bytes,1,opt,name=v_name" json:"v_name,omitempty"`
	// The file's metadata. It is invalid to provide a FileInput without both
	// the file's path and digest.
	Info *FileInfo `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"`
	// The file's context-dependent versions.
	Context []*CompilationUnit_ContextDependentVersionRow `protobuf:"bytes,3,rep,name=context" json:"context,omitempty"`
}

func (*CompilationUnit_FileInput) Descriptor added in v0.0.21

func (*CompilationUnit_FileInput) Descriptor() ([]byte, []int)

func (*CompilationUnit_FileInput) GetContext

func (*CompilationUnit_FileInput) GetInfo

func (m *CompilationUnit_FileInput) GetInfo() *FileInfo

func (*CompilationUnit_FileInput) GetVName

func (*CompilationUnit_FileInput) Marshal added in v0.0.17

func (m *CompilationUnit_FileInput) Marshal() (data []byte, err error)

func (*CompilationUnit_FileInput) MarshalTo added in v0.0.17

func (m *CompilationUnit_FileInput) MarshalTo(data []byte) (int, error)

func (*CompilationUnit_FileInput) ProtoMessage

func (*CompilationUnit_FileInput) ProtoMessage()

func (*CompilationUnit_FileInput) Reset

func (m *CompilationUnit_FileInput) Reset()

func (*CompilationUnit_FileInput) Size added in v0.0.17

func (m *CompilationUnit_FileInput) Size() (n int)

func (*CompilationUnit_FileInput) String

func (m *CompilationUnit_FileInput) String() string

func (*CompilationUnit_FileInput) Unmarshal added in v0.0.17

func (m *CompilationUnit_FileInput) Unmarshal(data []byte) error

type FileData

type FileData struct {
	// The content of the file, if known.  If missing == true, this field must be
	// empty.
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// A (possibly normalized) copy of the non-empty fields of the FileInfo
	// message from the Get request.  If either field from the original request
	// was empty, the server may optionally fill in that field in the reply if it
	// is known.  For example, if the client requested a file by path only and
	// the server found it, the reply MAY fill in the digest.
	Info *FileInfo `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"`
	// If true, no data are available for the requested file, and the content
	// field must be empty.  If false, the content field contains the complete
	// file content (which may be empty).
	Missing bool `protobuf:"varint,3,opt,name=missing,proto3" json:"missing,omitempty"`
}

A FileData carries the content of a single file, as returned from the Get method of a FileDataService.

func (*FileData) Descriptor added in v0.0.21

func (*FileData) Descriptor() ([]byte, []int)

func (*FileData) GetInfo

func (m *FileData) GetInfo() *FileInfo

func (*FileData) Marshal added in v0.0.17

func (m *FileData) Marshal() (data []byte, err error)

func (*FileData) MarshalTo added in v0.0.17

func (m *FileData) MarshalTo(data []byte) (int, error)

func (*FileData) ProtoMessage

func (*FileData) ProtoMessage()

func (*FileData) Reset

func (m *FileData) Reset()

func (*FileData) Size added in v0.0.17

func (m *FileData) Size() (n int)

func (*FileData) String

func (m *FileData) String() string

func (*FileData) Unmarshal added in v0.0.17

func (m *FileData) Unmarshal(data []byte) error

type FileDataServiceClient

type FileDataServiceClient interface {
	// Get returns the contents of one or more files needed for analysis.  It is
	// the server's responsibility to do any caching necessary to make this
	// perform well, so that an analyzer does not need to implement its own
	// caches unless it is doing something unusual.
	//
	// For each distinct path/digest pair in the request, the server must return
	// exactly one response.  The order of the responses is arbitrary.
	//
	// For each requested file, one or both of the path and digest fields must be
	// nonempty, otherwise an error is returned.  It is not an error for there to
	// be no requested files, however.
	Get(ctx context.Context, in *FilesRequest, opts ...grpc.CallOption) (FileDataService_GetClient, error)
}

func NewFileDataServiceClient

func NewFileDataServiceClient(cc *grpc.ClientConn) FileDataServiceClient

type FileDataServiceServer

type FileDataServiceServer interface {
	// Get returns the contents of one or more files needed for analysis.  It is
	// the server's responsibility to do any caching necessary to make this
	// perform well, so that an analyzer does not need to implement its own
	// caches unless it is doing something unusual.
	//
	// For each distinct path/digest pair in the request, the server must return
	// exactly one response.  The order of the responses is arbitrary.
	//
	// For each requested file, one or both of the path and digest fields must be
	// nonempty, otherwise an error is returned.  It is not an error for there to
	// be no requested files, however.
	Get(*FilesRequest, FileDataService_GetServer) error
}

type FileDataService_GetClient

type FileDataService_GetClient interface {
	Recv() (*FileData, error)
	grpc.ClientStream
}

type FileDataService_GetServer

type FileDataService_GetServer interface {
	Send(*FileData) error
	grpc.ServerStream
}

type FileInfo

type FileInfo struct {
	// The path of the file relative to the working directory of the compilation
	// command, which is typically the root of the build.
	// For example:
	//  file/base/file.cc
	//  ../../base/atomic_ref_count.h
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// The lowercase ascii hex SHA-256 digest of the file contents.
	Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
}

A FileInfo identifies a file used for analysis. At least one of the path and digest fields must be non-empty.

func (*FileInfo) Descriptor added in v0.0.21

func (*FileInfo) Descriptor() ([]byte, []int)

func (*FileInfo) Marshal added in v0.0.17

func (m *FileInfo) Marshal() (data []byte, err error)

func (*FileInfo) MarshalTo added in v0.0.17

func (m *FileInfo) MarshalTo(data []byte) (int, error)

func (*FileInfo) ProtoMessage

func (*FileInfo) ProtoMessage()

func (*FileInfo) Reset

func (m *FileInfo) Reset()

func (*FileInfo) Size added in v0.0.17

func (m *FileInfo) Size() (n int)

func (*FileInfo) String

func (m *FileInfo) String() string

func (*FileInfo) Unmarshal added in v0.0.17

func (m *FileInfo) Unmarshal(data []byte) error

type FilesRequest added in v0.0.16

type FilesRequest struct {
	Files []*FileInfo `protobuf:"bytes,1,rep,name=files" json:"files,omitempty"`
}

A FilesRequest specifies a collection of files to be fetched from a FileDataService.

func (*FilesRequest) Descriptor added in v0.0.21

func (*FilesRequest) Descriptor() ([]byte, []int)

func (*FilesRequest) GetFiles added in v0.0.16

func (m *FilesRequest) GetFiles() []*FileInfo

func (*FilesRequest) Marshal added in v0.0.17

func (m *FilesRequest) Marshal() (data []byte, err error)

func (*FilesRequest) MarshalTo added in v0.0.17

func (m *FilesRequest) MarshalTo(data []byte) (int, error)

func (*FilesRequest) ProtoMessage added in v0.0.16

func (*FilesRequest) ProtoMessage()

func (*FilesRequest) Reset added in v0.0.16

func (m *FilesRequest) Reset()

func (*FilesRequest) Size added in v0.0.17

func (m *FilesRequest) Size() (n int)

func (*FilesRequest) String added in v0.0.16

func (m *FilesRequest) String() string

func (*FilesRequest) Unmarshal added in v0.0.17

func (m *FilesRequest) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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