Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTooManyArgs = errors.New("[awses] too many arguments provided") ErrSingleDomain = errors.New("[awses] a single domain must be provided for the domain directive") ErrSingleRegion = errors.New("[awses] a single region must be provided for the region directive") ErrSingleRole = errors.New("[awses] a single role must be provided for the role directive") )
View Source
var ( ErrDomainNotFound = errors.New("AWS ES domain not found") ErrInvalidDomainName = errors.New("The provided AWS ES domain is invalid") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
func ParseConfigs ¶
func ParseConfigs(c *caddy.Controller) ([]*Config, error)
type Dispatcher ¶
type Dispatcher struct { Configs []*Config Next httpserver.Handler // contains filtered or unexported fields }
func NewDispatcher ¶
func NewDispatcher(configs []*Config, next httpserver.Handler) *Dispatcher
func (Dispatcher) ConfigForRequest ¶
func (d Dispatcher) ConfigForRequest(r *http.Request) *Config
func (Dispatcher) ServeHTTP ¶
func (d Dispatcher) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
type ElasticsearchClientFactory ¶
type ElasticsearchClientFactory struct { Role string // contains filtered or unexported fields }
An Elasticsearch client factory with a cache that allows concurrent cached client sharing
func NewElasticsearchClientFactory ¶
func NewElasticsearchClientFactory(role string) *ElasticsearchClientFactory
func (*ElasticsearchClientFactory) Get ¶
func (f *ElasticsearchClientFactory) Get(region string) *elasticsearchservice.ElasticsearchService
Returns a cached client or instantiates a new client and caches it
func (*ElasticsearchClientFactory) New ¶
func (f *ElasticsearchClientFactory) New(region string) sessionCache
Returns a new client (does not lock or use the cache)
type ElasticsearchManager ¶
type ElasticsearchManager struct { ClientFactory ElasticsearchClientFactory // contains filtered or unexported fields }
func NewElasticsearchManager ¶
func NewElasticsearchManager(role string) *ElasticsearchManager
func (*ElasticsearchManager) GetProxy ¶
func (m *ElasticsearchManager) GetProxy(region, domain string) (*httputil.ReverseProxy, error)
func (*ElasticsearchManager) ListDomains ¶
func (m *ElasticsearchManager) ListDomains(region string) ([]string, error)
func (*ElasticsearchManager) NewProxy ¶
func (m *ElasticsearchManager) NewProxy(region, domain string) (*httputil.ReverseProxy, error)
Click to show internal directories.
Click to hide internal directories.