Documentation ¶
Index ¶
- func SplitURLPath(pa string) (string, string)
- type Server
- func (s *Server) CreateFilter(w http.ResponseWriter, r *http.Request)
- func (h *Server) DeleteFilter(w http.ResponseWriter, r *http.Request, id string)
- func (s *Server) FieldDict(w http.ResponseWriter, req *http.Request, field string)
- func (s *Server) Fields(w http.ResponseWriter, req *http.Request)
- func (s *Server) Get(w http.ResponseWriter, req *http.Request)
- func (h *Server) ListFilterIDs(w http.ResponseWriter, r *http.Request)
- func (h *Server) ListFilters(w http.ResponseWriter, r *http.Request)
- func (h *Server) ReadFilter(w http.ResponseWriter, r *http.Request, id string)
- func (s *Server) RecvSyslogs(w http.ResponseWriter, req *http.Request)
- func (s *Server) RenderText(w http.ResponseWriter, req *http.Request, code int, txt string) error
- func (s *Server) Search(w http.ResponseWriter, req *http.Request, allFields bool, ...)
- func (s *Server) SearchByFilters(w http.ResponseWriter, req *http.Request, name string)
- func (s *Server) SearchByFiltersInBody(w http.ResponseWriter, req *http.Request)
- func (s *Server) SearchIn(w http.ResponseWriter, req *http.Request, searchRequest *bleve.SearchRequest, ...)
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) Summary(w http.ResponseWriter, req *http.Request)
- func (s *Server) SummaryByFilters(w http.ResponseWriter, req *http.Request, name string)
- func (s *Server) SummaryByFiltersInBody(w http.ResponseWriter, req *http.Request)
- func (s *Server) UpdateFilter(w http.ResponseWriter, r *http.Request, id string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitURLPath ¶
SplitURLPath 分隔 url path, 取出 url path 的第一部份
Types ¶
type Server ¶
type Server struct { Searcher ekanite.Searcher NoRoute http.Handler //engine *echo.Echo Logger *log.Logger // contains filtered or unexported fields }
Server serves query client connections.
func NewServer ¶
func NewServer(urlPrefix string, c chan<- ekanite.Document, searcher ekanite.Searcher, metaStore *service.MetaStore, logger *log.Logger) *Server
NewServer returns a new Server instance.
func (*Server) CreateFilter ¶
func (s *Server) CreateFilter(w http.ResponseWriter, r *http.Request)
func (*Server) DeleteFilter ¶
func (*Server) ListFilterIDs ¶
func (h *Server) ListFilterIDs(w http.ResponseWriter, r *http.Request)
func (*Server) ListFilters ¶
func (h *Server) ListFilters(w http.ResponseWriter, r *http.Request)
func (*Server) ReadFilter ¶
func (*Server) RecvSyslogs ¶
func (s *Server) RecvSyslogs(w http.ResponseWriter, req *http.Request)
func (*Server) RenderText ¶
func (*Server) Search ¶
func (s *Server) Search(w http.ResponseWriter, req *http.Request, allFields bool, cb func(req *bleve.SearchRequest, resp *bleve.SearchResult) error)
func (*Server) SearchByFilters ¶
func (*Server) SearchByFiltersInBody ¶
func (s *Server) SearchByFiltersInBody(w http.ResponseWriter, req *http.Request)
func (*Server) SearchIn ¶
func (s *Server) SearchIn(w http.ResponseWriter, req *http.Request, searchRequest *bleve.SearchRequest, cb func(req *bleve.SearchRequest, resp *bleve.SearchResult) error)
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements a http.Handler, serving the query interface for Ekanite
func (*Server) SummaryByFilters ¶
func (*Server) SummaryByFiltersInBody ¶
func (s *Server) SummaryByFiltersInBody(w http.ResponseWriter, req *http.Request)
func (*Server) UpdateFilter ¶
Click to show internal directories.
Click to hide internal directories.