Documentation ¶
Index ¶
- func InitAPI()
- type API
- func (handler *API) FaviconAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
- func (handler *API) GetRequestsAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func (handler *API) IndexAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
- func (handler *API) ProxyAction(w http.ResponseWriter, req *http.Request)
- func (handler *API) QueueResumeAction(w http.ResponseWriter, req *http.Request, p httprouter.Params)
- func (handler *API) QueueStatsAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
- func (handler *API) RedoRequestsAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
- func (handler *API) StatsAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
- type CacheConfig
- type CacheHandler
- type RedisConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
API namespace
func (*API) FaviconAction ¶
func (handler *API) FaviconAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
func (*API) GetRequestsAction ¶
func (handler *API) GetRequestsAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
func (*API) IndexAction ¶
func (handler *API) IndexAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
IndexAction returns cluster health information
func (*API) ProxyAction ¶
func (handler *API) ProxyAction(w http.ResponseWriter, req *http.Request)
func (*API) QueueResumeAction ¶
func (handler *API) QueueResumeAction(w http.ResponseWriter, req *http.Request, p httprouter.Params)
QueueResumeAction used to resume specify paused queue ➜ ~ curl --user user:password -XPOST http://localhost:2900/_proxy/queue/resume -d'{"queue":"primary"}'
func (*API) QueueStatsAction ¶
func (handler *API) QueueStatsAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
QueueStatsAction return queue stats information
func (*API) RedoRequestsAction ¶
func (handler *API) RedoRequestsAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
curl -XPOST http://localhost:2900/_proxy/request/redo -d'{"ids":["bb6t4cqaukihf1ag10q0","bb6t4daaukihf1ag10r0"]}' { "acknowledge": true, "result": { "bb6t4cqaukihf1ag10q0": "{\"_index\":\"myindex\",\"_type\":\"doc\",\"_id\":\"1\",\"_version\":17,\"result\":\"updated\",\"_shards\":{\"total\":2,\"successful\":1,\"failed\":0},\"_seq_no\":16,\"_primary_term\":2}", "bb6t4daaukihf1ag10r0": "{\"_index\":\"myindex\",\"_type\":\"doc\",\"_id\":\"1\",\"_version\":18,\"result\":\"updated\",\"_shards\":{\"total\":2,\"successful\":1,\"failed\":0},\"_seq_no\":17,\"_primary_term\":2}" } }
func (*API) StatsAction ¶
func (handler *API) StatsAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
StatsAction return stats information
type CacheConfig ¶
type CacheConfig struct { CacheEnabled bool `config:"enabled"` KeyPrefix string `config:"key_prefix"` TTL string `config:"ttl"` RedisConfig RedisConfig `config:"redis"` // contains filtered or unexported fields }
func (CacheConfig) GetTTLMilliseconds ¶
func (config CacheConfig) GetTTLMilliseconds() int64
type CacheHandler ¶
type CacheHandler struct {
// contains filtered or unexported fields
}
func (CacheHandler) Init ¶
func (handler CacheHandler) Init()