api

package
v0.0.0-...-7eb6335 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAPI

func InitAPI()

InitAPI init apis

Types

type API

type API struct {
	api.Handler
	// contains filtered or unexported fields
}

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) GetTTLDuration

func (config CacheConfig) GetTTLDuration() *time.Duration

type RedisConfig

type RedisConfig struct {
	Host     string `config:"host"`
	Port     string `config:"port"`
	Password string `config:"password"`
	DB       int    `config:"db"`
}

Jump to

Keyboard shortcuts

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