Documentation ¶
Index ¶
- type Srv
- type SrvURLKey
- type T
- func (be *T) Close() error
- func (be *T) DeleteServer(beSrvKey engine.ServerKey) bool
- func (be *T) HTTPBackendSettings() engine.HTTPBackendSettings
- func (be *T) Key() engine.BackendKey
- func (be *T) Server(beSrvKey engine.ServerKey) (Srv, bool)
- func (be *T) Snapshot() (*http.Transport, []Srv)
- func (be *T) String() string
- func (be *T) Update(beCfg engine.Backend, opts proxy.Options) (bool, error)
- func (be *T) UpsertServer(beSrvCfg engine.Server) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Srv ¶
type Srv struct {
// contains filtered or unexported fields
}
Srv represents a backend server instance.
type SrvURLKey ¶
type SrvURLKey struct {
// contains filtered or unexported fields
}
SrvURLKey represents a server URL when it needs to be used as a map key.
func NewSrvURLKey ¶
NewSrvURLKey creates an SrvURLKey from a server URL.
type T ¶
type T struct {
// contains filtered or unexported fields
}
T represents a backend type. It maintains a list of backend servers and returns them via Snapshot() functions.
func New ¶
New creates a new backend instance from a config fetched from a storage engine and proxy options. An initial list of backend servers can be provided.
func (*T) DeleteServer ¶
DeleteServer deletes a new backend server.
func (*T) HTTPBackendSettings ¶ added in v0.9.2
func (be *T) HTTPBackendSettings() engine.HTTPBackendSettings
func (*T) Snapshot ¶
Snapshot returns configured HTTP transport instance and a list of backend servers. Due to copy-on-write semantic it is the returned server list is immutable from callers prospective and it is efficient to call this function as frequently as you want for it won't make excessive allocations.