Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CheckInterval represents the time interval of running check. CheckInterval = time.Second )
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is used to control dashboard.
func NewManager ¶
NewManager creates a new Manager.
type Redirector ¶
type Redirector struct {
// contains filtered or unexported fields
}
Redirector is used to redirect when the dashboard is started in another PD.
func NewRedirector ¶
func NewRedirector(name string, tlsConfig *tls.Config) *Redirector
NewRedirector creates a new Redirector.
func (*Redirector) GetAddress ¶
func (h *Redirector) GetAddress() string
GetAddress is used to get the address to be redirected.
func (*Redirector) GetProxy ¶
func (h *Redirector) GetProxy() *httputil.ReverseProxy
GetProxy is used to get the reverse proxy arriving at address.
func (*Redirector) ReverseProxy ¶
func (h *Redirector) ReverseProxy(w http.ResponseWriter, r *http.Request)
ReverseProxy forwards the request to address and returns the response to the client.
func (*Redirector) SetAddress ¶
func (h *Redirector) SetAddress(addr string)
SetAddress is used to set a new address to be redirected.
func (*Redirector) TemporaryRedirect ¶
func (h *Redirector) TemporaryRedirect(w http.ResponseWriter, r *http.Request)
TemporaryRedirect sends the status code 307 to the client, and the client redirects itself.
Click to show internal directories.
Click to hide internal directories.