sourcebackendpb

package
v0.0.0-...-271e5ca Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SearchReply_Type_name = map[int32]string{
	0: "MATCH",
	1: "PROGRESS_UPDATE",
}
View Source
var SearchReply_Type_value = map[string]int32{
	"MATCH":           0,
	"PROGRESS_UPDATE": 1,
}

Functions

func RegisterSourceBackendServer

func RegisterSourceBackendServer(s *grpc.Server, srv SourceBackendServer)

Types

type FileReply

type FileReply struct {
	Contents             []byte   `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FileReply) Descriptor

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

func (*FileReply) GetContents

func (m *FileReply) GetContents() []byte

func (*FileReply) ProtoMessage

func (*FileReply) ProtoMessage()

func (*FileReply) Reset

func (m *FileReply) Reset()

func (*FileReply) String

func (m *FileReply) String() string

func (*FileReply) XXX_DiscardUnknown

func (m *FileReply) XXX_DiscardUnknown()

func (*FileReply) XXX_Marshal

func (m *FileReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FileReply) XXX_Merge

func (dst *FileReply) XXX_Merge(src proto.Message)

func (*FileReply) XXX_Size

func (m *FileReply) XXX_Size() int

func (*FileReply) XXX_Unmarshal

func (m *FileReply) XXX_Unmarshal(b []byte) error

type FileRequest

type FileRequest struct {
	Path                 string   `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FileRequest) Descriptor

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

func (*FileRequest) GetPath

func (m *FileRequest) GetPath() string

func (*FileRequest) ProtoMessage

func (*FileRequest) ProtoMessage()

func (*FileRequest) Reset

func (m *FileRequest) Reset()

func (*FileRequest) String

func (m *FileRequest) String() string

func (*FileRequest) XXX_DiscardUnknown

func (m *FileRequest) XXX_DiscardUnknown()

func (*FileRequest) XXX_Marshal

func (m *FileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FileRequest) XXX_Merge

func (dst *FileRequest) XXX_Merge(src proto.Message)

func (*FileRequest) XXX_Size

func (m *FileRequest) XXX_Size() int

func (*FileRequest) XXX_Unmarshal

func (m *FileRequest) XXX_Unmarshal(b []byte) error

type Match

type Match struct {
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Line uint32 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"`
	// Contents of line-2.
	Ctxp2 string `protobuf:"bytes,3,opt,name=ctxp2,proto3" json:"ctxp2,omitempty"`
	// Contents of line-1.
	Ctxp1 string `protobuf:"bytes,4,opt,name=ctxp1,proto3" json:"ctxp1,omitempty"`
	// Contents of the line containing the match.
	Context string `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"`
	// Contents of line+1.
	Ctxn1 string `protobuf:"bytes,6,opt,name=ctxn1,proto3" json:"ctxn1,omitempty"`
	// Contents of line+2.
	Ctxn2                string   `protobuf:"bytes,7,opt,name=ctxn2,proto3" json:"ctxn2,omitempty"`
	Pathrank             float32  `protobuf:"fixed32,8,opt,name=pathrank,proto3" json:"pathrank,omitempty"`
	Ranking              float32  `protobuf:"fixed32,9,opt,name=ranking,proto3" json:"ranking,omitempty"`
	Package              string   `protobuf:"bytes,10,opt,name=package,proto3" json:"package,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Match) Descriptor

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

func (*Match) GetContext

func (m *Match) GetContext() string

func (*Match) GetCtxn1

func (m *Match) GetCtxn1() string

func (*Match) GetCtxn2

func (m *Match) GetCtxn2() string

func (*Match) GetCtxp1

func (m *Match) GetCtxp1() string

func (*Match) GetCtxp2

func (m *Match) GetCtxp2() string

func (*Match) GetLine

func (m *Match) GetLine() uint32

func (*Match) GetPackage

func (m *Match) GetPackage() string

func (*Match) GetPath

func (m *Match) GetPath() string

func (*Match) GetPathrank

func (m *Match) GetPathrank() float32

func (*Match) GetRanking

func (m *Match) GetRanking() float32

func (*Match) ProtoMessage

func (*Match) ProtoMessage()

func (*Match) Reset

func (m *Match) Reset()

func (*Match) String

func (m *Match) String() string

func (*Match) XXX_DiscardUnknown

func (m *Match) XXX_DiscardUnknown()

func (*Match) XXX_Marshal

func (m *Match) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Match) XXX_Merge

func (dst *Match) XXX_Merge(src proto.Message)

func (*Match) XXX_Size

func (m *Match) XXX_Size() int

func (*Match) XXX_Unmarshal

func (m *Match) XXX_Unmarshal(b []byte) error

type ProgressUpdate

type ProgressUpdate struct {
	FilesProcessed       uint64   `protobuf:"varint,1,opt,name=files_processed,json=filesProcessed,proto3" json:"files_processed,omitempty"`
	FilesTotal           uint64   `protobuf:"varint,2,opt,name=files_total,json=filesTotal,proto3" json:"files_total,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProgressUpdate) Descriptor

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

func (*ProgressUpdate) GetFilesProcessed

func (m *ProgressUpdate) GetFilesProcessed() uint64

func (*ProgressUpdate) GetFilesTotal

func (m *ProgressUpdate) GetFilesTotal() uint64

func (*ProgressUpdate) ProtoMessage

func (*ProgressUpdate) ProtoMessage()

func (*ProgressUpdate) Reset

func (m *ProgressUpdate) Reset()

func (*ProgressUpdate) String

func (m *ProgressUpdate) String() string

func (*ProgressUpdate) XXX_DiscardUnknown

func (m *ProgressUpdate) XXX_DiscardUnknown()

func (*ProgressUpdate) XXX_Marshal

func (m *ProgressUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProgressUpdate) XXX_Merge

func (dst *ProgressUpdate) XXX_Merge(src proto.Message)

func (*ProgressUpdate) XXX_Size

func (m *ProgressUpdate) XXX_Size() int

func (*ProgressUpdate) XXX_Unmarshal

func (m *ProgressUpdate) XXX_Unmarshal(b []byte) error

type ReplaceIndexReply

type ReplaceIndexReply struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReplaceIndexReply) Descriptor

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

func (*ReplaceIndexReply) ProtoMessage

func (*ReplaceIndexReply) ProtoMessage()

func (*ReplaceIndexReply) Reset

func (m *ReplaceIndexReply) Reset()

func (*ReplaceIndexReply) String

func (m *ReplaceIndexReply) String() string

func (*ReplaceIndexReply) XXX_DiscardUnknown

func (m *ReplaceIndexReply) XXX_DiscardUnknown()

func (*ReplaceIndexReply) XXX_Marshal

func (m *ReplaceIndexReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReplaceIndexReply) XXX_Merge

func (dst *ReplaceIndexReply) XXX_Merge(src proto.Message)

func (*ReplaceIndexReply) XXX_Size

func (m *ReplaceIndexReply) XXX_Size() int

func (*ReplaceIndexReply) XXX_Unmarshal

func (m *ReplaceIndexReply) XXX_Unmarshal(b []byte) error

type ReplaceIndexRequest

type ReplaceIndexRequest struct {
	ReplacementPath      string   `protobuf:"bytes,1,opt,name=replacement_path,json=replacementPath,proto3" json:"replacement_path,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReplaceIndexRequest) Descriptor

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

func (*ReplaceIndexRequest) GetReplacementPath

func (m *ReplaceIndexRequest) GetReplacementPath() string

func (*ReplaceIndexRequest) ProtoMessage

func (*ReplaceIndexRequest) ProtoMessage()

func (*ReplaceIndexRequest) Reset

func (m *ReplaceIndexRequest) Reset()

func (*ReplaceIndexRequest) String

func (m *ReplaceIndexRequest) String() string

func (*ReplaceIndexRequest) XXX_DiscardUnknown

func (m *ReplaceIndexRequest) XXX_DiscardUnknown()

func (*ReplaceIndexRequest) XXX_Marshal

func (m *ReplaceIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReplaceIndexRequest) XXX_Merge

func (dst *ReplaceIndexRequest) XXX_Merge(src proto.Message)

func (*ReplaceIndexRequest) XXX_Size

func (m *ReplaceIndexRequest) XXX_Size() int

func (*ReplaceIndexRequest) XXX_Unmarshal

func (m *ReplaceIndexRequest) XXX_Unmarshal(b []byte) error

type SearchReply

type SearchReply struct {
	Type                 SearchReply_Type `protobuf:"varint,1,opt,name=type,proto3,enum=sourcebackendpb.SearchReply_Type" json:"type,omitempty"`
	Match                *Match           `protobuf:"bytes,2,opt,name=match,proto3" json:"match,omitempty"`
	ProgressUpdate       *ProgressUpdate  `protobuf:"bytes,3,opt,name=progress_update,json=progressUpdate,proto3" json:"progress_update,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*SearchReply) Descriptor

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

func (*SearchReply) GetMatch

func (m *SearchReply) GetMatch() *Match

func (*SearchReply) GetProgressUpdate

func (m *SearchReply) GetProgressUpdate() *ProgressUpdate

func (*SearchReply) GetType

func (m *SearchReply) GetType() SearchReply_Type

func (*SearchReply) ProtoMessage

func (*SearchReply) ProtoMessage()

func (*SearchReply) Reset

func (m *SearchReply) Reset()

func (*SearchReply) String

func (m *SearchReply) String() string

func (*SearchReply) XXX_DiscardUnknown

func (m *SearchReply) XXX_DiscardUnknown()

func (*SearchReply) XXX_Marshal

func (m *SearchReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchReply) XXX_Merge

func (dst *SearchReply) XXX_Merge(src proto.Message)

func (*SearchReply) XXX_Size

func (m *SearchReply) XXX_Size() int

func (*SearchReply) XXX_Unmarshal

func (m *SearchReply) XXX_Unmarshal(b []byte) error

type SearchReply_Type

type SearchReply_Type int32
const (
	SearchReply_MATCH           SearchReply_Type = 0
	SearchReply_PROGRESS_UPDATE SearchReply_Type = 1
)

func (SearchReply_Type) EnumDescriptor

func (SearchReply_Type) EnumDescriptor() ([]byte, []int)

func (SearchReply_Type) String

func (x SearchReply_Type) String() string

type SearchRequest

type SearchRequest struct {
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// Rewritten URL (after RewriteQuery()) with all the parameters that
	// are relevant for ranking.
	RewrittenUrl         string   `protobuf:"bytes,2,opt,name=rewritten_url,json=rewrittenUrl,proto3" json:"rewritten_url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SearchRequest) Descriptor

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

func (*SearchRequest) GetQuery

func (m *SearchRequest) GetQuery() string

func (*SearchRequest) GetRewrittenUrl

func (m *SearchRequest) GetRewrittenUrl() string

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) Reset

func (m *SearchRequest) Reset()

func (*SearchRequest) String

func (m *SearchRequest) String() string

func (*SearchRequest) XXX_DiscardUnknown

func (m *SearchRequest) XXX_DiscardUnknown()

func (*SearchRequest) XXX_Marshal

func (m *SearchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchRequest) XXX_Merge

func (dst *SearchRequest) XXX_Merge(src proto.Message)

func (*SearchRequest) XXX_Size

func (m *SearchRequest) XXX_Size() int

func (*SearchRequest) XXX_Unmarshal

func (m *SearchRequest) XXX_Unmarshal(b []byte) error

type SourceBackendClient

type SourceBackendClient interface {
	// File reads the file and returns its contents.
	File(ctx context.Context, in *FileRequest, opts ...grpc.CallOption) (*FileReply, error)
	// Search performs the given query and streams matches/progress updates.
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (SourceBackend_SearchClient, error)
	// Replaces the loaded index with the specified replacement index. On a file
	// system level, the specified file is mv'ed to the file specified by
	// -index_path.
	ReplaceIndex(ctx context.Context, in *ReplaceIndexRequest, opts ...grpc.CallOption) (*ReplaceIndexReply, error)
}

SourceBackendClient is the client API for SourceBackend service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSourceBackendClient

func NewSourceBackendClient(cc *grpc.ClientConn) SourceBackendClient

type SourceBackendServer

type SourceBackendServer interface {
	// File reads the file and returns its contents.
	File(context.Context, *FileRequest) (*FileReply, error)
	// Search performs the given query and streams matches/progress updates.
	Search(*SearchRequest, SourceBackend_SearchServer) error
	// Replaces the loaded index with the specified replacement index. On a file
	// system level, the specified file is mv'ed to the file specified by
	// -index_path.
	ReplaceIndex(context.Context, *ReplaceIndexRequest) (*ReplaceIndexReply, error)
}

SourceBackendServer is the server API for SourceBackend service.

type SourceBackend_SearchClient

type SourceBackend_SearchClient interface {
	Recv() (*SearchReply, error)
	grpc.ClientStream
}

type SourceBackend_SearchServer

type SourceBackend_SearchServer interface {
	Send(*SearchReply) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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