rates

package
v1.0.0-dev Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments Copyright (C) ITsysCOM GmbH

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RateS

type RateS struct {
	// contains filtered or unexported fields
}

RateS calculates costs for events

func NewRateS

func NewRateS(cfg *config.CGRConfig, filterS *engine.FilterS, dm *engine.DataManager) *RateS

NewRateS instantiates the RateS

func (*RateS) ListenAndServe

func (rS *RateS) ListenAndServe(stopChan, cfgRld chan struct{})

ListenAndServe keeps the service alive

func (*RateS) V1CostForEvent

func (rS *RateS) V1CostForEvent(ctx *context.Context, args *utils.CGREvent, rpCost *utils.RateProfileCost) (err error)

V1CostForEvent calculates the cost for an event using matching rate profiles. If a higher priority profile fails, it tries the next matching profile. This continues until a valid cost is found or all profiles are exhausted.

func (*RateS) V1RateProfileRatesForEvent

func (rS *RateS) V1RateProfileRatesForEvent(ctx *context.Context, args *utils.CGREventWithRateProfile, rtIDs *[]string) (err error)

RateProfilesForEvent returns the list of rates that are matching the event from a specific profile

func (*RateS) V1RateProfilesForEvent

func (rS *RateS) V1RateProfilesForEvent(ctx *context.Context, args *utils.CGREvent, rpIDs *[]string) (err error)

V1RateProfilesForEvent will be called to list the RateProfilesIDs that are matching the event

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL