Documentation ¶
Index ¶
- func Adapt(name plugin.Name, rpcClient rpc_client.Client) loadbalancer.L4
- func NewClient(name plugin.Name, socketPath string) (loadbalancer.L4, error)
- type BackendsRequest
- type BackendsResponse
- type ConfigureHealthCheckRequest
- type ConfigureHealthCheckResponse
- type DeregisterBackendsRequest
- type DeregisterBackendsResponse
- type L4
- func (l4 *L4) Backends(_ *http.Request, req *BackendsRequest, resp *BackendsResponse) error
- func (l4 *L4) ConfigureHealthCheck(_ *http.Request, req *ConfigureHealthCheckRequest, ...) error
- func (l4 *L4) DeregisterBackends(_ *http.Request, req *DeregisterBackendsRequest, ...) error
- func (l4 *L4) ImplementedInterface() spi.InterfaceSpec
- func (l4 *L4) Name(_ *http.Request, req *NameRequest, resp *NameResponse) error
- func (l4 *L4) Publish(_ *http.Request, req *PublishRequest, resp *PublishResponse) error
- func (l4 *L4) RegisterBackends(_ *http.Request, req *RegisterBackendsRequest, resp *RegisterBackendsResponse) error
- func (l4 *L4) Routes(_ *http.Request, req *RoutesRequest, resp *RoutesResponse) error
- func (l4 *L4) Types() []string
- func (l4 *L4) Unpublish(_ *http.Request, req *UnpublishRequest, resp *UnpublishResponse) error
- func (l4 *L4) VendorInfo() *spi.VendorInfo
- type NameRequest
- type NameResponse
- type PublishRequest
- type PublishResponse
- type RegisterBackendsRequest
- type RegisterBackendsResponse
- type RoutesRequest
- type RoutesResponse
- type UnpublishRequest
- type UnpublishResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Adapt ¶
func Adapt(name plugin.Name, rpcClient rpc_client.Client) loadbalancer.L4
Adapt converts a rpc client to a Plugin object
Types ¶
type BackendsRequest ¶
type BackendsRequest struct {
Type string
}
BackendsRequest is the rpc wrapper for Backends request
type BackendsResponse ¶
BackendsResponse is the rpc response for Backends call
type ConfigureHealthCheckRequest ¶
type ConfigureHealthCheckRequest struct { Type string loadbalancer.HealthCheck `json:",inline" yaml:",inline"` }
ConfigureHealthCheckRequest is the rpc wrapper for ConfigureHealthCheck request
type ConfigureHealthCheckResponse ¶
ConfigureHealthCheckResponse is the rpc wrapper for ConfigureHealthCheck response
type DeregisterBackendsRequest ¶
DeregisterBackendsRequest is the rpc wrapper for DeregisterBackend request
type DeregisterBackendsResponse ¶
DeregisterBackendsResponse is the rpc wrapper for DeregisterBackend response
type L4 ¶
type L4 struct {
// contains filtered or unexported fields
}
L4 is the exported type for json-rpc
func PluginServer ¶
func PluginServer(l4 loadbalancer.L4) *L4
PluginServer returns a L4 load balancer that conforms to the net/rpc rpc call convention.
func PluginServerWithNames ¶
func PluginServerWithNames(list func() (map[string]loadbalancer.L4, error)) *L4
PluginServerWithNames returns a loadbalancer map of plugins by name
func (*L4) Backends ¶
func (l4 *L4) Backends(_ *http.Request, req *BackendsRequest, resp *BackendsResponse) error
Backends returns the list of backends
func (*L4) ConfigureHealthCheck ¶
func (l4 *L4) ConfigureHealthCheck(_ *http.Request, req *ConfigureHealthCheckRequest, resp *ConfigureHealthCheckResponse) error
ConfigureHealthCheck configures the health checks for instance removal and reconfiguration
func (*L4) DeregisterBackends ¶
func (l4 *L4) DeregisterBackends(_ *http.Request, req *DeregisterBackendsRequest, resp *DeregisterBackendsResponse) error
DeregisterBackends removes the specified instances from the backend pool
func (*L4) ImplementedInterface ¶
func (l4 *L4) ImplementedInterface() spi.InterfaceSpec
ImplementedInterface returns the interface implemented by this RPC service.
func (*L4) Name ¶
func (l4 *L4) Name(_ *http.Request, req *NameRequest, resp *NameResponse) error
Name returns the name of the load balancer
func (*L4) Publish ¶
func (l4 *L4) Publish(_ *http.Request, req *PublishRequest, resp *PublishResponse) error
Publish publishes a route in the LB by adding a load balancing rule
func (*L4) RegisterBackends ¶
func (l4 *L4) RegisterBackends(_ *http.Request, req *RegisterBackendsRequest, resp *RegisterBackendsResponse) error
RegisterBackends registers instances identified by the IDs to the LB's backend pool
func (*L4) Routes ¶
func (l4 *L4) Routes(_ *http.Request, req *RoutesRequest, resp *RoutesResponse) error
Routes lists all known routes.
func (*L4) Unpublish ¶
func (l4 *L4) Unpublish(_ *http.Request, req *UnpublishRequest, resp *UnpublishResponse) error
Unpublish dissociates the load balancer from the backend service at the given port.
func (*L4) VendorInfo ¶
func (l4 *L4) VendorInfo() *spi.VendorInfo
VendorInfo returns a metadata object about the plugin, if the plugin implements it. See plugin.Vendor
type NameRequest ¶
type NameRequest struct {
Type string
}
NameRequest is the rpc wrapper for the Name request
type NameResponse ¶
NameResponse is the rpc wrapper for the Name response
type PublishRequest ¶
type PublishRequest struct { Type string Route loadbalancer.Route }
PublishRequest is the rpc wrapper for Publish request
type PublishResponse ¶
PublishResponse is the rpc wrapper for Publish response
type RegisterBackendsRequest ¶
RegisterBackendsRequest is the rpc wrapper for RegisterBackend request
type RegisterBackendsResponse ¶
RegisterBackendsResponse is the rpc wrapper for RegisterBackend response
type RoutesRequest ¶
type RoutesRequest struct {
Type string
}
RoutesRequest is the rpc wrapper for Routes request
type RoutesResponse ¶
type RoutesResponse struct { Type string Routes []loadbalancer.Route }
RoutesResponse is the rpc wrapper for Routes response
type UnpublishRequest ¶
UnpublishRequest is the rpc wrapper for Unpublish request
type UnpublishResponse ¶
UnpublishResponse is the rpc wrapper for Unpublish response