Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultHealthCheck(req *http.Request, resp *http.Response, err error) bool
- type HealthCheck
- type LblHttpClient
- func (m *LblHttpClient) AddBackend(addr string, alias string, healthCheck HealthCheck) error
- func (m *LblHttpClient) DoRequest(clientIp string, request *http.Request) (*http.Response, error)
- func (m *LblHttpClient) RemoveBackend(alias string) error
- func (m *LblHttpClient) SetJsonExp(jsonExpJson []byte) error
- type LoadBalanceMethod
- type UrlValuesForJsonExp
Constants ¶
Variables ¶
Functions ¶
Types ¶
type LblHttpClient ¶
type LblHttpClient struct {
// contains filtered or unexported fields
}
func NewLoadBalanceClient ¶
func NewLoadBalanceClient(method LoadBalanceMethod, maxIdleConnectionsPerServer int, methodUrlParamKey string, connTimeout, waitResponseTimeout time.Duration) *LblHttpClient
func (*LblHttpClient) AddBackend ¶
func (m *LblHttpClient) AddBackend(addr string, alias string, healthCheck HealthCheck) error
func (*LblHttpClient) RemoveBackend ¶
func (m *LblHttpClient) RemoveBackend(alias string) error
func (*LblHttpClient) SetJsonExp ¶
func (m *LblHttpClient) SetJsonExp(jsonExpJson []byte) error
type LoadBalanceMethod ¶
type LoadBalanceMethod uint32
const ( MethodRoundrobin LoadBalanceMethod = iota MethodRandom MethodMinPending MethodIpHash MethodUrlParam MethodJsonExp // very powerful )
type UrlValuesForJsonExp ¶
func (*UrlValuesForJsonExp) GetPropertyValue ¶
func (m *UrlValuesForJsonExp) GetPropertyValue(property string, context jsonexp.Context) interface{}
func (*UrlValuesForJsonExp) SetPropertyValue ¶
func (m *UrlValuesForJsonExp) SetPropertyValue(property string, value interface{}, context jsonexp.Context)
implements jsonexp.Object
Click to show internal directories.
Click to hide internal directories.