Documentation ¶
Index ¶
- func GetBaseNameDeserializer() object_store.Deserializer
- func GetBaseNameSerializer() object_store.Serializer
- func GetFlowDescriptionFromFlowString(descriptorStr string) (*protos.FlowDescription, error)
- func GetPolicyDeserializer() object_store.Deserializer
- func GetPolicySerializer() object_store.Serializer
- func GetRuleMappingDeserializer() object_store.Deserializer
- func GetRuleMappingSerializer() object_store.Serializer
- type BaseNameStreamListener
- type ChargingKey
- type OmnipresentRulesStreamListener
- func (listener *OmnipresentRulesStreamListener) GetExtraArgs() *any.Any
- func (listener *OmnipresentRulesStreamListener) GetName() string
- func (listener *OmnipresentRulesStreamListener) ReportError(e error) error
- func (listener *OmnipresentRulesStreamListener) Update(ub *orcprotos.DataUpdateBatch) bool
- type PolicyDBClient
- type PolicyDBStreamListener
- type RedisPolicyDBClient
- func (client *RedisPolicyDBClient) GetChargingKeysForRules(staticRuleIDs []string, dynamicRuleDefs []*protos.PolicyRule) []ChargingKey
- func (client *RedisPolicyDBClient) GetOmnipresentRules() ([]string, []string)
- func (client *RedisPolicyDBClient) GetPolicyRuleByID(id string) (*protos.PolicyRule, error)
- func (client *RedisPolicyDBClient) GetRuleIDsForBaseNames(baseNames []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBaseNameDeserializer ¶
func GetBaseNameDeserializer() object_store.Deserializer
func GetBaseNameSerializer ¶
func GetBaseNameSerializer() object_store.Serializer
func GetFlowDescriptionFromFlowString ¶
func GetFlowDescriptionFromFlowString(descriptorStr string) (*protos.FlowDescription, error)
GetFlowDescriptionFromFlowString returns a proto.FlowDescription from a IPFilterRule string passed in the Flow-Description AVP. This AVP can have many variations, but follows the format:
action direction proto from src to dst
e.g.:
permit out ip from 1.2.3.0/24 to any
func GetPolicyDeserializer ¶
func GetPolicyDeserializer() object_store.Deserializer
func GetPolicySerializer ¶
func GetPolicySerializer() object_store.Serializer
func GetRuleMappingDeserializer ¶
func GetRuleMappingDeserializer() object_store.Deserializer
func GetRuleMappingSerializer ¶
func GetRuleMappingSerializer() object_store.Serializer
Types ¶
type BaseNameStreamListener ¶
type BaseNameStreamListener struct {
// contains filtered or unexported fields
}
func NewBaseNameStreamListener ¶
func NewBaseNameStreamListener(streamMap object_store.ObjectMap) *BaseNameStreamListener
func (*BaseNameStreamListener) GetExtraArgs ¶
func (*BaseNameStreamListener) GetName ¶
func (listener *BaseNameStreamListener) GetName() string
Gateway Streamer Listener Interface Implementation
func (*BaseNameStreamListener) ReportError ¶
func (*BaseNameStreamListener) Update ¶
func (listener *BaseNameStreamListener) Update(ub *orcprotos.DataUpdateBatch) bool
type ChargingKey ¶
ChargingKey defines a reporting key for a charging rule the key could be the policy RatingGroup or RatingGroup and Service Identity combo
func CreateChargingKey ¶
func CreateChargingKey(rule *protos.PolicyRule) ChargingKey
CreateChargingKey creates & returns ChargingKey from a given policy
func (ChargingKey) String ¶
func (k ChargingKey) String() string
type OmnipresentRulesStreamListener ¶
type OmnipresentRulesStreamListener struct {
// contains filtered or unexported fields
}
func NewOmnipresentRulesListener ¶
func NewOmnipresentRulesListener(streamMap object_store.ObjectMap) *OmnipresentRulesStreamListener
func (*OmnipresentRulesStreamListener) GetExtraArgs ¶
func (*OmnipresentRulesStreamListener) GetName ¶
func (listener *OmnipresentRulesStreamListener) GetName() string
Gateway Streamer Listener Interface Implementation
func (*OmnipresentRulesStreamListener) ReportError ¶
func (*OmnipresentRulesStreamListener) Update ¶
func (listener *OmnipresentRulesStreamListener) Update(ub *orcprotos.DataUpdateBatch) bool
type PolicyDBClient ¶
type PolicyDBClient interface { GetChargingKeysForRules(ruleIDs []string, ruleDefs []*protos.PolicyRule) []ChargingKey GetPolicyRuleByID(id string) (*protos.PolicyRule, error) GetRuleIDsForBaseNames(baseNames []string) []string // This gets a list of rules that should be active for all subscribers in the network GetOmnipresentRules() ([]string, []string) }
PolicyDBClient defines interactions with the stored policy rules
type PolicyDBStreamListener ¶
type PolicyDBStreamListener struct {
// contains filtered or unexported fields
}
func NewPolicyDBStreamListener ¶
func NewPolicyDBStreamListener(streamMap object_store.ObjectMap) *PolicyDBStreamListener
func (*PolicyDBStreamListener) GetExtraArgs ¶
func (*PolicyDBStreamListener) GetName ¶
func (listener *PolicyDBStreamListener) GetName() string
Gateway Streamer Listener Interface Implementation
func (*PolicyDBStreamListener) ReportError ¶
func (*PolicyDBStreamListener) Update ¶
func (listener *PolicyDBStreamListener) Update(ub *orcprotos.DataUpdateBatch) bool
type RedisPolicyDBClient ¶
type RedisPolicyDBClient struct { PolicyMap object_store.ObjectMap BaseNameMap object_store.ObjectMap OmnipresentRules object_store.ObjectMap StreamerClient streamer.Client }
RedisPolicyDBClient is a policy client that loads policies from Redis
func NewRedisPolicyDBClient ¶
func NewRedisPolicyDBClient(reg service_registry.GatewayRegistry) (*RedisPolicyDBClient, error)
NewRedisPolicyDBClient creates a new RedisPolicyDBClient
func (*RedisPolicyDBClient) GetChargingKeysForRules ¶
func (client *RedisPolicyDBClient) GetChargingKeysForRules(staticRuleIDs []string, dynamicRuleDefs []*protos.PolicyRule) []ChargingKey
GetChargingKeysForRules retrieves the charging keys associated with the given rule names from redis.
func (*RedisPolicyDBClient) GetOmnipresentRules ¶
func (client *RedisPolicyDBClient) GetOmnipresentRules() ([]string, []string)
func (*RedisPolicyDBClient) GetPolicyRuleByID ¶
func (client *RedisPolicyDBClient) GetPolicyRuleByID(id string) (*protos.PolicyRule, error)
GetPolicyRuleByID returns a policy from its ID from redis
func (*RedisPolicyDBClient) GetRuleIDsForBaseNames ¶
func (client *RedisPolicyDBClient) GetRuleIDsForBaseNames(baseNames []string) []string
GetRuleIDsForBaseNames gets the policy rule ids for given charging rule base names. These base name mappings are stored into redis through the stream client