Documentation ¶
Index ¶
- Constants
- type AdvanceRouteRule
- type BasicRouteRule
- type Domain
- type DomainBeUsedInfo
- type DomainFilter
- type DomainManager
- func (m *DomainManager) BeUsed(ctx context.Context, product *ibasic.Product, domain *Domain) (*DomainBeUsedInfo, error)
- func (m *DomainManager) CreateDomain(ctx context.Context, product *ibasic.Product, param *DomainParam) (err error)
- func (m *DomainManager) DeleteDomain(ctx context.Context, product *ibasic.Product, domain *Domain) (err error)
- func (m *DomainManager) DomainList(ctx context.Context, param *DomainFilter) (list []*Domain, err error)
- type DomainParam
- type DomainStorager
- type HostUsedInfo
- type ProductRouteRule
- type ProductRouteRuleConvertResult
- type RouteRuleCase
- type RouteRuleExportData
- type RouteRuleManager
- func (rm *RouteRuleManager) ClusterDeleteChecker(ctx context.Context, product *ibasic.Product, cluster *icluster_conf.Cluster) error
- func (rm *RouteRuleManager) ExportRouteRule(ctx context.Context, lastVersion string) (*RouteRuleExportData, error)
- func (rm *RouteRuleManager) ExpressionVerify(ctx context.Context, expression string) (err error)
- func (rm *RouteRuleManager) FetchProductRule(ctx context.Context, product *ibasic.Product) (prr *ProductRouteRule, err error)
- func (rm *RouteRuleManager) UpsertProductRule(ctx context.Context, product *ibasic.Product, rule *ProductRouteRule) error
- type RouteRuleRunCaseResult
- type RouteRuleStorager
Constants ¶
View Source
const (
ConfigTopicRouteRule = "route_rule"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvanceRouteRule ¶
type BasicRouteRule ¶
type DomainBeUsedInfo ¶
type DomainBeUsedInfo struct { RoutRule *HostUsedInfo // contains filtered or unexported fields }
func (*DomainBeUsedInfo) Dependent ¶
func (dbui *DomainBeUsedInfo) Dependent() (typ, name string)
func (*DomainBeUsedInfo) String ¶
func (dbui *DomainBeUsedInfo) String() string
type DomainFilter ¶
type DomainManager ¶
type DomainManager struct {
// contains filtered or unexported fields
}
func NewDomainManager ¶
func NewDomainManager(txn itxn.TxnStorager, storager DomainStorager, routeRuleManager *RouteRuleManager) *DomainManager
func (*DomainManager) BeUsed ¶
func (m *DomainManager) BeUsed(ctx context.Context, product *ibasic.Product, domain *Domain) (*DomainBeUsedInfo, error)
func (*DomainManager) CreateDomain ¶
func (m *DomainManager) CreateDomain(ctx context.Context, product *ibasic.Product, param *DomainParam) (err error)
func (*DomainManager) DeleteDomain ¶
func (*DomainManager) DomainList ¶
func (m *DomainManager) DomainList(ctx context.Context, param *DomainFilter) (list []*Domain, err error)
type DomainParam ¶
type DomainStorager ¶
type HostUsedInfo ¶
type ProductRouteRule ¶
type ProductRouteRule struct { BasicRouteRules []*BasicRouteRule AdvanceRouteRules []*AdvanceRouteRule RouteCases []*RouteRuleCase }
func (*ProductRouteRule) Convert ¶
func (pfr *ProductRouteRule) Convert() (*ProductRouteRuleConvertResult, error)
func (*ProductRouteRule) HostBeUsed ¶
func (prr *ProductRouteRule) HostBeUsed(host string) *HostUsedInfo
type ProductRouteRuleConvertResult ¶
type ProductRouteRuleConvertResult struct { BasicRouteRuleFiles []route_rule_conf.BasicRouteRuleFile AdvancedRouteRuleFiles []route_rule_conf.AdvancedRouteRuleFile ReferClusterNames []string }
type RouteRuleCase ¶
type RouteRuleExportData ¶
type RouteRuleExportData struct { Version string HostTable *host_rule_conf.HostTableConf RouteTable *route_rule_conf.RouteTableFile ClusterConf *cluster_conf.BfeClusterConf }
func (*RouteRuleExportData) UpdateVersion ¶
func (rred *RouteRuleExportData) UpdateVersion(version string) error
type RouteRuleManager ¶
type RouteRuleManager struct {
// contains filtered or unexported fields
}
func NewRouteRuleManager ¶
func NewRouteRuleManager(txn itxn.TxnStorager, storager RouteRuleStorager, clusterStorager icluster_conf.ClusterStorager, productStorager ibasic.ProductStorager, versionControlManager *iversion_control.VersionControlManager, domainStorager DomainStorager) *RouteRuleManager
func (*RouteRuleManager) ClusterDeleteChecker ¶
func (rm *RouteRuleManager) ClusterDeleteChecker(ctx context.Context, product *ibasic.Product, cluster *icluster_conf.Cluster) error
func (*RouteRuleManager) ExportRouteRule ¶
func (rm *RouteRuleManager) ExportRouteRule(ctx context.Context, lastVersion string) (*RouteRuleExportData, error)
func (*RouteRuleManager) ExpressionVerify ¶
func (rm *RouteRuleManager) ExpressionVerify(ctx context.Context, expression string) (err error)
func (*RouteRuleManager) FetchProductRule ¶
func (rm *RouteRuleManager) FetchProductRule(ctx context.Context, product *ibasic.Product) (prr *ProductRouteRule, err error)
func (*RouteRuleManager) UpsertProductRule ¶
func (rm *RouteRuleManager) UpsertProductRule(ctx context.Context, product *ibasic.Product, rule *ProductRouteRule) error
type RouteRuleRunCaseResult ¶
type RouteRuleRunCaseResult struct { RouteRuleCase ActualCluster string Pass bool }
type RouteRuleStorager ¶
type RouteRuleStorager interface { UpsertProductRule(ctx context.Context, product *ibasic.Product, rule *ProductRouteRule) error FetchProductRule(ctx context.Context, product *ibasic.Product, clusterList []*icluster_conf.Cluster) (*ProductRouteRule, error) FetchRoutRules(ctx context.Context, products []*ibasic.Product, clusterList []*icluster_conf.Cluster) (map[int64]*ProductRouteRule, error) }
Click to show internal directories.
Click to hide internal directories.