 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  var NewServer = func(listenerAddr []string, port, serviceName, configsPath, templatesPath string, cert Certer) Server {
	return &serve{
		listenerAddresses: listenerAddr,
		port:              port,
		serviceName:       serviceName,
		configsPath:       configsPath,
		templatesPath:     templatesPath,
		cert:              cert,
	}
}
    NewServer returns instance of the Server with populated data
Functions ¶
Types ¶
type CertResponse ¶
CertResponse represent a response when a request for certificates is made.
type Certer ¶
type Certer interface {
	Put(w http.ResponseWriter, req *http.Request) (string, error)
	PutCert(certName string, certContent []byte) (string, error)
	GetAll(w http.ResponseWriter, req *http.Request) (CertResponse, error)
	Init() error
}
    Certer defines the interface that must be implemented by any struct that deals with certificates.
type Configer ¶
type Configer interface {
	Get(w http.ResponseWriter, req *http.Request)
}
    Configer defines the interface that must be implemented by any struct that deals with proxy configuration.
type HttpRequestParameterProvider ¶
HttpRequestParameterProvider defines structure used to convert HTTP parameters into proxy.Service
func (*HttpRequestParameterProvider) Fill ¶
func (p *HttpRequestParameterProvider) Fill(service *proxy.Service)
Fill converts HTTP parameters into proxy.Service struct
func (*HttpRequestParameterProvider) GetString ¶
func (p *HttpRequestParameterProvider) GetString(name string) string
GetString returns parameter value
type Server ¶
type Server interface {
	GetServicesFromEnvVars() *[]proxy.Service
	GetServiceFromUrl(req *http.Request) *proxy.Service
	PingHandler(w http.ResponseWriter, req *http.Request)
	ReconfigureHandler(w http.ResponseWriter, req *http.Request)
	ReloadHandler(w http.ResponseWriter, req *http.Request)
	RemoveHandler(w http.ResponseWriter, req *http.Request)
	Test1Handler(w http.ResponseWriter, req *http.Request)
	Test2Handler(w http.ResponseWriter, req *http.Request)
}
    Server handles requests
 Click to show internal directories. 
   Click to hide internal directories.