Documentation
¶
Index ¶
- type BalMap
- type BalTable
- func (t *BalTable) BalTableConfLoad(gslbConfFilename, clusterTableFilename string) (gslb_conf.GslbConf, cluster_table_conf.ClusterTableConf, error)
- func (t *BalTable) BalTableReload(gslbConfs gslb_conf.GslbConf, backendConfs cluster_table_conf.ClusterTableConf) error
- func (t *BalTable) GetState() *BalTableState
- func (t *BalTable) GetVersions() BalVersion
- func (t *BalTable) Init(gslbConfFilename, clusterTableFilename string) error
- func (t *BalTable) Lookup(clusterName string) (*bal_gslb.BalanceGslb, error)
- func (t *BalTable) SetGslbBasic(clusterTable *bfe_route.ClusterTable)
- func (t *BalTable) SetSlowStart(clusterTable *bfe_route.ClusterTable)
- type BalTableState
- type BalVersion
- type BfeBalance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalMap ¶
type BalMap map[string]*bal_gslb.BalanceGslb
BalMap holds mappings from clusterName to BalanceGslb.
type BalTable ¶
type BalTable struct {
// contains filtered or unexported fields
}
func NewBalTable ¶
func NewBalTable(checkConfFetcher backend.CheckConfFetcher) *BalTable
func (*BalTable) BalTableConfLoad ¶
func (t *BalTable) BalTableConfLoad(gslbConfFilename, clusterTableFilename string) ( gslb_conf.GslbConf, cluster_table_conf.ClusterTableConf, error)
func (*BalTable) BalTableReload ¶
func (t *BalTable) BalTableReload(gslbConfs gslb_conf.GslbConf, backendConfs cluster_table_conf.ClusterTableConf) error
func (*BalTable) GetState ¶
func (t *BalTable) GetState() *BalTableState
GetState returns state of BalTable.
func (*BalTable) GetVersions ¶
func (t *BalTable) GetVersions() BalVersion
GetVersions returns versions of BalTable.
func (*BalTable) Lookup ¶
func (t *BalTable) Lookup(clusterName string) (*bal_gslb.BalanceGslb, error)
Lookup lookup BalanceGslb by cluster name.
func (*BalTable) SetGslbBasic ¶
func (t *BalTable) SetGslbBasic(clusterTable *bfe_route.ClusterTable)
SetGslbBasic sets gslb basic conf (from server data conf) for BalTable.
Note:
- SetGslbBasic() is called after server reload gslb conf or server data conf
- SetGslbBasic() should be concurrency safe
func (*BalTable) SetSlowStart ¶ added in v1.1.0
func (t *BalTable) SetSlowStart(clusterTable *bfe_route.ClusterTable)
SetSlowStart sets slow_start related conf (from server data conf) for BalTable.
Note:
- SetSlowStart() is called after server reload server data conf
- SetSlowStart() should be concurrency safe
type BalTableState ¶
type BalTableState struct { Balancers map[string]*bal_gslb.GslbState // state of cluster BackendNum int // size of backendTable }
func NewBalTableState ¶
func NewBalTableState() *BalTableState
type BalVersion ¶
type BfeBalance ¶
type BfeBalance interface { // Init initialize Init(backendConf cluster_table_conf.ClusterBackend, gslbBasic cluster_conf.GslbBasicConf, gslbConf gslb_conf.GslbClusterConf) error // Reload reload config Reload(backendConf cluster_table_conf.ClusterBackend, gslbBasic cluster_conf.GslbBasicConf, gslbConf gslb_conf.GslbClusterConf) error // Balance load balance for request Balance(req *bfe_basic.Request) (*backend.BfeBackend, error) // Release releases Release() }
Click to show internal directories.
Click to hide internal directories.