Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type CacheRule ¶
type Cacher ¶
type Cacher struct {
// contains filtered or unexported fields
}
type HTTPProxyService ¶
type HTTPProxyService struct {
// contains filtered or unexported fields
}
HTTPProxyService is a service that is used to proxy HTTP requests to the Region. Invocation of this service normally should happen via Temporal.
func NewHTTPProxyService ¶
func NewHTTPProxyService(socketDir string, cache Cache) *HTTPProxyService
NewHTTPProxyService returns an instance of HTTPProxyService TODO: consider switching to opts pattern
func (*HTTPProxyService) ConfiguratorName ¶
func (s *HTTPProxyService) ConfiguratorName() string
ConfiguratorName returns a name that will be used to register Configure method as Temporal workflow.
func (*HTTPProxyService) Configure ¶
func (s *HTTPProxyService) Configure() interface{}
Configure represents a Temporal workflow that is capable for configuring Agent HTTP proxy service.
func (*HTTPProxyService) Error ¶
func (s *HTTPProxyService) Error() error
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy is a caching reverse HTTP proxy that sends request to a target.
type ProxyOption ¶
type ProxyOption func(*Proxy)
ProxyOption allows to set additional options for the proxy
func WithCacher ¶
func WithCacher(c *Cacher) ProxyOption
WithCacher allows to set caching middleware
func WithRewriter ¶
func WithRewriter(r *Rewriter) ProxyOption
WithRewriter allows to set URL rewriter middleware
type RewriteRule ¶
func NewRewriteRule ¶
func NewRewriteRule(pattern *regexp.Regexp, to string) *RewriteRule
func (*RewriteRule) Replace ¶
func (r *RewriteRule) Replace(u *url.URL) string
func (*RewriteRule) Rewrite ¶
func (r *RewriteRule) Rewrite(req *http.Request) bool
type Rewriter ¶
type Rewriter struct {
// contains filtered or unexported fields
}
func NewRewriter ¶
func NewRewriter(rules []*RewriteRule) *Rewriter
Source Files
¶
- cache.go
- proxy.go
- rewrite.go
- service.go