Documentation
¶
Index ¶
- Variables
- func NewRouter(grpcAddr string, logger *log.Logger) (*blasthttp.Router, error)
- func RecordMetrics(start time.Time, funcName string)
- type DeleteHandler
- type GRPCService
- func (s *GRPCService) DeleteDocument(stream protobuf.Blast_DeleteDocumentServer) error
- func (s *GRPCService) GetDocument(ctx context.Context, req *protobuf.GetDocumentRequest) (*protobuf.GetDocumentResponse, error)
- func (s *GRPCService) IndexDocument(stream protobuf.Blast_IndexDocumentServer) error
- func (s *GRPCService) Search(ctx context.Context, req *protobuf.SearchRequest) (*protobuf.SearchResponse, error)
- func (s *GRPCService) Start() error
- func (s *GRPCService) Stop() error
- type GetHandler
- type IndexHandler
- type RootHandler
- type SearchHandler
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DurationSeconds = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: namespace, Subsystem: subsystem, Name: "duration_seconds", Help: "The index operation durations in seconds.", }, []string{ "func", }, ) OperationsTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: namespace, Subsystem: subsystem, Name: "operations_total", Help: "The number of index operations.", }, []string{ "func", }, ) )
Functions ¶
func RecordMetrics ¶
Types ¶
type DeleteHandler ¶
type DeleteHandler struct {
// contains filtered or unexported fields
}
func NewDeleteDocumentHandler ¶
func NewDeleteDocumentHandler(client *grpc.Client, logger *log.Logger) *DeleteHandler
func (*DeleteHandler) ServeHTTP ¶
func (h *DeleteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GRPCService ¶
func NewGRPCService ¶
func NewGRPCService(managerAddr string, logger *log.Logger) (*GRPCService, error)
func (*GRPCService) DeleteDocument ¶
func (s *GRPCService) DeleteDocument(stream protobuf.Blast_DeleteDocumentServer) error
func (*GRPCService) GetDocument ¶
func (s *GRPCService) GetDocument(ctx context.Context, req *protobuf.GetDocumentRequest) (*protobuf.GetDocumentResponse, error)
func (*GRPCService) IndexDocument ¶
func (s *GRPCService) IndexDocument(stream protobuf.Blast_IndexDocumentServer) error
func (*GRPCService) Search ¶
func (s *GRPCService) Search(ctx context.Context, req *protobuf.SearchRequest) (*protobuf.SearchResponse, error)
func (*GRPCService) Start ¶
func (s *GRPCService) Start() error
func (*GRPCService) Stop ¶
func (s *GRPCService) Stop() error
type GetHandler ¶
type GetHandler struct {
// contains filtered or unexported fields
}
func NewGetDocumentHandler ¶
func NewGetDocumentHandler(client *grpc.Client, logger *log.Logger) *GetHandler
func (*GetHandler) ServeHTTP ¶
func (h *GetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type IndexHandler ¶
type IndexHandler struct {
// contains filtered or unexported fields
}
func NewSetDocumentHandler ¶
func NewSetDocumentHandler(client *grpc.Client, logger *log.Logger) *IndexHandler
func (*IndexHandler) ServeHTTP ¶
func (h *IndexHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RootHandler ¶
type RootHandler struct {
// contains filtered or unexported fields
}
func NewRootHandler ¶
func NewRootHandler(logger *log.Logger) *RootHandler
func (*RootHandler) ServeHTTP ¶
func (h *RootHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type SearchHandler ¶
type SearchHandler struct {
// contains filtered or unexported fields
}
func NewSearchHandler ¶
func NewSearchHandler(client *grpc.Client, logger *log.Logger) *SearchHandler
func (*SearchHandler) ServeHTTP ¶
func (h *SearchHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.