Documentation
¶
Index ¶
- Variables
- type ClusterMap
- type ClusterTable
- func (t *ClusterTable) BasicInit(clusterConfs cluster_conf.BfeClusterConf)
- func (t *ClusterTable) ClusterMap() ClusterMap
- func (t *ClusterTable) GetVersions() ClusterVersion
- func (t *ClusterTable) Init(clusterConfFilename string) error
- func (t *ClusterTable) Lookup(clusterName string) (*bfe_cluster.BfeCluster, error)
- type ClusterVersion
- type HostTable
- func (t *HostTable) GetStatus() Status
- func (t *HostTable) GetVersions() Versions
- func (t *HostTable) Lookup(req *bfe_basic.Request) bfe_basic.RequestRoute
- func (t *HostTable) LookupCluster(req *bfe_basic.Request) error
- func (t *HostTable) LookupHostTagAndProduct(req *bfe_basic.Request) error
- func (t *HostTable) LookupProduct(hostname string) (string, error)
- func (t *HostTable) LookupProductByVip(vip string) (string, error)
- func (t *HostTable) Update(hostConf host_rule_conf.HostConf, vipConf vip_rule_conf.VipConf, ...)
- type ServerDataConf
- type Status
- type Versions
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ClusterMap ¶
type ClusterMap map[string]*bfe_cluster.BfeCluster
ClusterMap holds mappings from clusterName to cluster.
type ClusterTable ¶
type ClusterTable struct {
// contains filtered or unexported fields
}
func (*ClusterTable) BasicInit ¶
func (t *ClusterTable) BasicInit(clusterConfs cluster_conf.BfeClusterConf)
func (*ClusterTable) ClusterMap ¶
func (t *ClusterTable) ClusterMap() ClusterMap
func (*ClusterTable) GetVersions ¶
func (t *ClusterTable) GetVersions() ClusterVersion
func (*ClusterTable) Init ¶
func (t *ClusterTable) Init(clusterConfFilename string) error
func (*ClusterTable) Lookup ¶
func (t *ClusterTable) Lookup(clusterName string) (*bfe_cluster.BfeCluster, error)
type ClusterVersion ¶
type ClusterVersion struct {
ClusterConfVer string // version of cluster-conf
}
type HostTable ¶
type HostTable struct {
// contains filtered or unexported fields
}
HostTable holds mappings from host to prduct and mappings from product to cluster rules.
func (*HostTable) GetVersions ¶
GetVersions return versions of host table.
func (*HostTable) Lookup ¶
func (t *HostTable) Lookup(req *bfe_basic.Request) bfe_basic.RequestRoute
Lookup find cluster name with given hostname.
func (*HostTable) LookupCluster ¶
LookupCluster find clusterName with given request.
func (*HostTable) LookupHostTagAndProduct ¶
LookupHostTagAndProduct find hosttag and product with given hostname.
func (*HostTable) LookupProduct ¶
LookupProduct find product name with given hostname.
func (*HostTable) LookupProductByVip ¶
LookupProductByVip find product name by vip.
func (*HostTable) Update ¶
func (t *HostTable) Update(hostConf host_rule_conf.HostConf, vipConf vip_rule_conf.VipConf, routeConf *route_rule_conf.RouteTableConf)
Update updates host table
type ServerDataConf ¶
type ServerDataConf struct { HostTable *HostTable ClusterTable *ClusterTable }
func LoadServerDataConf ¶
func LoadServerDataConf(hostFile, vipFile, routeFile, clusterConfFile string) (*ServerDataConf, error)
LoadServerDataConf loads ServerDataConf config.
func (*ServerDataConf) ClusterTableLookup ¶
func (s *ServerDataConf) ClusterTableLookup(clusterName string) (*bfe_cluster.BfeCluster, error)
ClusterTableLookup find backend with given cluster-name and request. implement interface ServerDataConfInterface.
func (*ServerDataConf) HostTableLookup ¶
func (s *ServerDataConf) HostTableLookup(hostname string) (string, error)
HostTableLookup find cluster name with given hostname. implement interface ServerDataConfInterface.
Directories
¶
Path | Synopsis |
---|---|
Package trie implements a simple trie data structure that maps "paths" (which are slices of strings) to arbitrary data values (type interface{}).
|
Package trie implements a simple trie data structure that maps "paths" (which are slices of strings) to arbitrary data values (type interface{}). |