dispatcher

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(grpcAddr string, logger *zap.Logger) (*blasthttp.Router, error)

Types

type DeleteHandler

type DeleteHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteDocumentHandler

func NewDeleteDocumentHandler(client *grpc.Client, logger *zap.Logger) *DeleteHandler

func (*DeleteHandler) ServeHTTP

func (h *DeleteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GRPCService

type GRPCService struct {
	*grpc.Service
	// contains filtered or unexported fields
}

func NewGRPCService

func NewGRPCService(managerAddr string, logger *zap.Logger) (*GRPCService, error)

func (*GRPCService) DeleteDocument

func (s *GRPCService) DeleteDocument(stream protobuf.Blast_DeleteDocumentServer) error

func (*GRPCService) GetDocument

func (*GRPCService) IndexDocument

func (s *GRPCService) IndexDocument(stream protobuf.Blast_IndexDocumentServer) error

func (*GRPCService) Search

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 *zap.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 *zap.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 *zap.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 *zap.Logger) *SearchHandler

func (*SearchHandler) ServeHTTP

func (h *SearchHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(managerAddr string, grpcAddr string, httpAddr string, logger *zap.Logger, httpLogger accesslog.Logger) (*Server, error)

func (*Server) Start

func (s *Server) Start()

func (*Server) Stop

func (s *Server) Stop()

Jump to

Keyboard shortcuts

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