ips

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 IPAllocationsList

type IPAllocationsList []*ipAllocations

IPAllocationsList is a collection of ipAllocations objects.

type IPService

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

IPService is the service handling IP allocations

func NewIPService

func NewIPService(dm *engine.DataManager, cfg *config.CGRConfig,
	fltrs *engine.FilterS, cm *engine.ConnManager) *IPService

NewIPService returns a new IPService

func (*IPService) Reload

func (s *IPService) Reload(ctx *context.Context)

Reload stops the backupLoop and restarts it

func (*IPService) Shutdown

func (s *IPService) Shutdown(ctx *context.Context)

Shutdown is called to shutdown the service

func (*IPService) StartLoop

func (s *IPService) StartLoop(ctx *context.Context)

StartLoop starts the gorutine with the backup loop

func (*IPService) V1AllocateIP

func (s *IPService) V1AllocateIP(ctx *context.Context, args *utils.CGREvent, reply *string) (err error)

V1AllocateIP is called when an IP requires allocation.

func (*IPService) V1AuthorizeIP

func (s *IPService) V1AuthorizeIP(ctx *context.Context, args *utils.CGREvent, reply *string) (err error)

V1AuthorizeIP queries service to find if an Usage is allowed

func (*IPService) V1GetIPAllocations

func (s *IPService) V1GetIPAllocations(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.IPAllocations) error

V1GetIPAllocations returns a resource configuration

func (*IPService) V1GetIPAllocationsForEvent

func (s *IPService) V1GetIPAllocationsForEvent(ctx *context.Context, args *utils.CGREvent, reply *IPAllocationsList) (err error)

V1GetIPAllocationsForEvent returns active IPs matching the event.

func (*IPService) V1ReleaseIP

func (s *IPService) V1ReleaseIP(ctx *context.Context, args *utils.CGREvent, reply *string) (err error)

V1ReleaseIP is called when we need to clear an allocation

Jump to

Keyboard shortcuts

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