resources

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceS

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

ResourceS is the service handling resources

func NewResourceService

func NewResourceService(dm *engine.DataManager, cgrcfg *config.CGRConfig,
	filterS *engine.FilterS, connMgr *engine.ConnManager) *ResourceS

NewResourceService returns a new ResourceService

func (*ResourceS) Reload

func (rS *ResourceS) Reload(ctx *context.Context)

Reload stops the backupLoop and restarts it

func (*ResourceS) Shutdown

func (rS *ResourceS) Shutdown(ctx *context.Context)

Shutdown is called to shutdown the service

func (*ResourceS) StartLoop

func (rS *ResourceS) StartLoop(ctx *context.Context)

StartLoop starts the gorutine with the backup loop

func (*ResourceS) V1AllocateResources

func (rS *ResourceS) V1AllocateResources(ctx *context.Context, args *utils.CGREvent, reply *string) (err error)

V1AllocateResources is called when a resource requires allocation

func (*ResourceS) V1AuthorizeResources

func (rS *ResourceS) V1AuthorizeResources(ctx *context.Context, args *utils.CGREvent, reply *string) (err error)

V1AuthorizeResources queries service to find if an Usage is allowed

func (*ResourceS) V1GetResource

func (rS *ResourceS) V1GetResource(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.Resource) error

V1GetResource returns a resource configuration

func (*ResourceS) V1GetResourceWithConfig

func (rS *ResourceS) V1GetResourceWithConfig(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.ResourceWithConfig) (err error)

func (*ResourceS) V1GetResourcesForEvent

func (rS *ResourceS) V1GetResourcesForEvent(ctx *context.Context, args *utils.CGREvent, reply *Resources) (err error)

V1GetResourcesForEvent returns active resource configs matching the event

func (*ResourceS) V1ReleaseResources

func (rS *ResourceS) V1ReleaseResources(ctx *context.Context, args *utils.CGREvent, reply *string) (err error)

V1ReleaseResources is called when we need to clear an allocation

type Resources

type Resources []*resource

Resources is a collection of Resource objects.

Jump to

Keyboard shortcuts

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