Documentation ¶
Index ¶
- Variables
- func RegisterSourceBackendServer(s *grpc.Server, srv SourceBackendServer)
- type FileReply
- func (*FileReply) Descriptor() ([]byte, []int)
- func (m *FileReply) GetContents() []byte
- func (*FileReply) ProtoMessage()
- func (m *FileReply) Reset()
- func (m *FileReply) String() string
- func (m *FileReply) XXX_DiscardUnknown()
- func (m *FileReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *FileReply) XXX_Merge(src proto.Message)
- func (m *FileReply) XXX_Size() int
- func (m *FileReply) XXX_Unmarshal(b []byte) error
- type FileRequest
- func (*FileRequest) Descriptor() ([]byte, []int)
- func (m *FileRequest) GetPath() string
- func (*FileRequest) ProtoMessage()
- func (m *FileRequest) Reset()
- func (m *FileRequest) String() string
- func (m *FileRequest) XXX_DiscardUnknown()
- func (m *FileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *FileRequest) XXX_Merge(src proto.Message)
- func (m *FileRequest) XXX_Size() int
- func (m *FileRequest) XXX_Unmarshal(b []byte) error
- type Match
- func (*Match) Descriptor() ([]byte, []int)
- func (m *Match) GetContext() string
- func (m *Match) GetCtxn1() string
- func (m *Match) GetCtxn2() string
- func (m *Match) GetCtxp1() string
- func (m *Match) GetCtxp2() string
- func (m *Match) GetLine() uint32
- func (m *Match) GetPackage() string
- func (m *Match) GetPath() string
- func (m *Match) GetPathrank() float32
- func (m *Match) GetRanking() float32
- func (*Match) ProtoMessage()
- func (m *Match) Reset()
- func (m *Match) String() string
- func (m *Match) XXX_DiscardUnknown()
- func (m *Match) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Match) XXX_Merge(src proto.Message)
- func (m *Match) XXX_Size() int
- func (m *Match) XXX_Unmarshal(b []byte) error
- type ProgressUpdate
- func (*ProgressUpdate) Descriptor() ([]byte, []int)
- func (m *ProgressUpdate) GetFilesProcessed() uint64
- func (m *ProgressUpdate) GetFilesTotal() uint64
- func (*ProgressUpdate) ProtoMessage()
- func (m *ProgressUpdate) Reset()
- func (m *ProgressUpdate) String() string
- func (m *ProgressUpdate) XXX_DiscardUnknown()
- func (m *ProgressUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ProgressUpdate) XXX_Merge(src proto.Message)
- func (m *ProgressUpdate) XXX_Size() int
- func (m *ProgressUpdate) XXX_Unmarshal(b []byte) error
- type ReplaceIndexReply
- func (*ReplaceIndexReply) Descriptor() ([]byte, []int)
- func (*ReplaceIndexReply) ProtoMessage()
- func (m *ReplaceIndexReply) Reset()
- func (m *ReplaceIndexReply) String() string
- func (m *ReplaceIndexReply) XXX_DiscardUnknown()
- func (m *ReplaceIndexReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ReplaceIndexReply) XXX_Merge(src proto.Message)
- func (m *ReplaceIndexReply) XXX_Size() int
- func (m *ReplaceIndexReply) XXX_Unmarshal(b []byte) error
- type ReplaceIndexRequest
- func (*ReplaceIndexRequest) Descriptor() ([]byte, []int)
- func (m *ReplaceIndexRequest) GetReplacementPath() string
- func (*ReplaceIndexRequest) ProtoMessage()
- func (m *ReplaceIndexRequest) Reset()
- func (m *ReplaceIndexRequest) String() string
- func (m *ReplaceIndexRequest) XXX_DiscardUnknown()
- func (m *ReplaceIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ReplaceIndexRequest) XXX_Merge(src proto.Message)
- func (m *ReplaceIndexRequest) XXX_Size() int
- func (m *ReplaceIndexRequest) XXX_Unmarshal(b []byte) error
- type SearchReply
- func (*SearchReply) Descriptor() ([]byte, []int)
- func (m *SearchReply) GetMatch() *Match
- func (m *SearchReply) GetProgressUpdate() *ProgressUpdate
- func (m *SearchReply) GetType() SearchReply_Type
- func (*SearchReply) ProtoMessage()
- func (m *SearchReply) Reset()
- func (m *SearchReply) String() string
- func (m *SearchReply) XXX_DiscardUnknown()
- func (m *SearchReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SearchReply) XXX_Merge(src proto.Message)
- func (m *SearchReply) XXX_Size() int
- func (m *SearchReply) XXX_Unmarshal(b []byte) error
- type SearchReply_Type
- type SearchRequest
- func (*SearchRequest) Descriptor() ([]byte, []int)
- func (m *SearchRequest) GetQuery() string
- func (m *SearchRequest) GetRewrittenUrl() string
- func (*SearchRequest) ProtoMessage()
- func (m *SearchRequest) Reset()
- func (m *SearchRequest) String() string
- func (m *SearchRequest) XXX_DiscardUnknown()
- func (m *SearchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SearchRequest) XXX_Merge(src proto.Message)
- func (m *SearchRequest) XXX_Size() int
- func (m *SearchRequest) XXX_Unmarshal(b []byte) error
- type SourceBackendClient
- type SourceBackendServer
- type SourceBackend_SearchClient
- type SourceBackend_SearchServer
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) GetContents ¶
func (*FileReply) ProtoMessage ¶
func (*FileReply) ProtoMessage()
func (*FileReply) XXX_DiscardUnknown ¶
func (m *FileReply) XXX_DiscardUnknown()
func (*FileReply) XXX_Marshal ¶
func (*FileReply) XXX_Unmarshal ¶
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) GetContext ¶
func (*Match) GetPackage ¶
func (*Match) GetPathrank ¶
func (*Match) GetRanking ¶
func (*Match) ProtoMessage ¶
func (*Match) ProtoMessage()
func (*Match) XXX_DiscardUnknown ¶
func (m *Match) XXX_DiscardUnknown()
func (*Match) XXX_Marshal ¶
func (*Match) XXX_Unmarshal ¶
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 }
Click to show internal directories.
Click to hide internal directories.