Documentation
¶
Index ¶
- Variables
- func GetSetCGRID(ev engine.MapEvent) (cgrID string)
- type ArgsReplicateSessions
- type BiRPClient
- type ExternalSession
- type SRun
- type Session
- func (s *Session) AsExternalSession(sr *SRun, tmz, nodeID string) (aS *ExternalSession)
- func (s *Session) AsExternalSessions(tmz, nodeID string) (aSs []*ExternalSession)
- func (s *Session) Clone() (cln *Session)
- func (s *Session) Lock()
- func (s *Session) RLock()
- func (s *Session) RUnlock()
- func (s *Session) Unlock()
- func (s *Session) UpdateSRuns(updEv engine.MapEvent, alterableFields utils.StringSet)
- type SessionID
- type SessionS
- func (sS *SessionS) BiRPCV1GetMaxUsage(clnt rpcclient.ClientConnector, ev engine.MapEvent, maxUsage *float64) (err error)
- func (sS *SessionS) BiRPCV1InitiateSession(clnt rpcclient.ClientConnector, ev engine.MapEvent, maxUsage *float64) (err error)
- func (sS *SessionS) BiRPCV1ProcessCDR(clnt rpcclient.ClientConnector, ev engine.MapEvent, rply *string) (err error)
- func (sS *SessionS) BiRPCV1TerminateSession(clnt rpcclient.ClientConnector, ev engine.MapEvent, rply *string) (err error)
- func (sS *SessionS) BiRPCV1UpdateSession(clnt rpcclient.ClientConnector, ev engine.MapEvent, maxUsage *float64) (err error)
- func (sS *SessionS) BiRPCv1ActivateSessions(clnt rpcclient.ClientConnector, sIDs []string, reply *string) (err error)
- func (sS *SessionS) BiRPCv1AuthorizeEvent(clnt rpcclient.ClientConnector, args *V1AuthorizeArgs, ...) (err error)
- func (sS *SessionS) BiRPCv1AuthorizeEventWithDigest(clnt rpcclient.ClientConnector, args *V1AuthorizeArgs, ...) (err error)
- func (sS *SessionS) BiRPCv1DeactivateSessions(clnt rpcclient.ClientConnector, sIDs []string, reply *string) (err error)
- func (sS *SessionS) BiRPCv1ForceDisconnect(clnt rpcclient.ClientConnector, args *utils.SessionFilter, reply *string) (err error)
- func (sS *SessionS) BiRPCv1GetActiveSessions(clnt rpcclient.ClientConnector, args *utils.SessionFilter, ...) (err error)
- func (sS *SessionS) BiRPCv1GetActiveSessionsCount(clnt rpcclient.ClientConnector, args *utils.SessionFilter, reply *int) error
- func (sS *SessionS) BiRPCv1GetPassiveSessions(clnt rpcclient.ClientConnector, args *utils.SessionFilter, ...) error
- func (sS *SessionS) BiRPCv1GetPassiveSessionsCount(clnt rpcclient.ClientConnector, args *utils.SessionFilter, reply *int) error
- func (sS *SessionS) BiRPCv1InitiateSession(clnt rpcclient.ClientConnector, args *V1InitSessionArgs, ...) (err error)
- func (sS *SessionS) BiRPCv1InitiateSessionWithDigest(clnt rpcclient.ClientConnector, args *V1InitSessionArgs, ...) (err error)
- func (sS *SessionS) BiRPCv1ProcessCDR(clnt rpcclient.ClientConnector, ...) (err error)
- func (sS *SessionS) BiRPCv1ProcessEvent(clnt rpcclient.ClientConnector, args *V1ProcessEventArgs, ...) (err error)
- func (sS *SessionS) BiRPCv1ProcessMessage(clnt rpcclient.ClientConnector, args *V1ProcessMessageArgs, ...) (err error)
- func (sS *SessionS) BiRPCv1RegisterInternalBiJSONConn(clnt rpcclient.ClientConnector, ign string, reply *string) error
- func (sS *SessionS) BiRPCv1ReplicateSessions(clnt rpcclient.ClientConnector, args ArgsReplicateSessions, reply *string) (err error)
- func (sS *SessionS) BiRPCv1SetPassiveSession(clnt rpcclient.ClientConnector, s *Session, reply *string) (err error)
- func (sS *SessionS) BiRPCv1SyncSessions(clnt rpcclient.ClientConnector, ignParam string, reply *string) error
- func (sS *SessionS) BiRPCv1TerminateSession(clnt rpcclient.ClientConnector, args *V1TerminateSessionArgs, rply *string) (err error)
- func (sS *SessionS) BiRPCv1UpdateSession(clnt rpcclient.ClientConnector, args *V1UpdateSessionArgs, ...) (err error)
- func (sS *SessionS) Call(serviceMethod string, args interface{}, reply interface{}) error
- func (sS *SessionS) CallBiRPC(clnt rpcclient.ClientConnector, serviceMethod string, args interface{}, ...) error
- func (sS *SessionS) ListenAndServe(exitChan chan bool) (err error)
- func (sS *SessionS) OnBiJSONConnect(c *rpc2.Client)
- func (sS *SessionS) OnBiJSONDisconnect(c *rpc2.Client)
- func (sS *SessionS) RegisterIntBiJConn(c rpcclient.ClientConnector)
- func (sS *SessionS) Shutdown() (err error)
- type V1AuthorizeArgs
- type V1AuthorizeReply
- type V1AuthorizeReplyWithDigest
- type V1InitReplyWithDigest
- type V1InitSessionArgs
- type V1InitSessionReply
- type V1ProcessEventArgs
- type V1ProcessEventReply
- type V1ProcessMessageArgs
- type V1ProcessMessageReply
- type V1TerminateSessionArgs
- type V1UpdateSessionArgs
- type V1UpdateSessionReply
Constants ¶
This section is empty.
Variables ¶
var ( // ErrForcedDisconnect is used to specify the reason why the session was disconnected ErrForcedDisconnect = errors.New("FORCED_DISCONNECT") )
Functions ¶
func GetSetCGRID ¶
GetSetCGRID will populate the CGRID key if not present and return it
Types ¶
type ArgsReplicateSessions ¶
ArgsReplicateSessions used to specify wich Session to replicate over the given connections
type BiRPClient ¶
type BiRPClient interface {
Call(serviceMethod string, args interface{}, reply interface{}) error
V1DisconnectSession(args utils.AttrDisconnectSession, reply *string) (err error)
V1GetActiveSessionIDs(ignParam string, sessionIDs *[]*SessionID) (err error)
}
BiRPClient is the interface implemented by Agents which are able to communicate bidirectionally with SessionS and remote Communication Switch
type ExternalSession ¶
type ExternalSession struct {
CGRID string
RunID string
ToR string // type of record, meta-field, should map to one of the TORs hardcoded inside the server <*voice|*data|*sms|*generic>
OriginID string // represents the unique accounting id given by the telecom switch generating the CDR
OriginHost string // represents the IP address of the host generating the CDR (automatically populated by the server)
Source string // formally identifies the source of the CDR (free form field)
RequestType string // matching the supported request types by the **CGRateS**, accepted values are hardcoded in the server <prepaid|postpaid|pseudoprepaid|rated>
Tenant string // tenant whom this record belongs
Category string // free-form filter for this record, matching the category defined in rating profiles.
Account string // account id (accounting subsystem) the record should be attached to
Subject string // rating subject (rating subsystem) this record should be attached to
Destination string // destination to be charged
SetupTime time.Time // set-up time of the event. Supported formats: datetime RFC3339 compatible, SQL datetime (eg: MySQL), unix timestamp.
AnswerTime time.Time // answer time of the event. Supported formats: datetime RFC3339 compatible, SQL datetime (eg: MySQL), unix timestamp.
Usage time.Duration // event usage information (eg: in case of tor=*voice this will represent the total duration of a call)
ExtraFields map[string]string // Extra fields to be stored in CDR
NodeID string
LoopIndex float64 // indicates the position of this segment in a cost request loop
DurationIndex time.Duration // the call duration so far (till TimeEnd)
MaxRate float64
MaxRateUnit time.Duration
MaxCostSoFar float64
DebitInterval time.Duration
NextAutoDebit time.Time
}
ExternalSession is used when displaying active sessions via RPC
type SRun ¶
type SRun struct {
Event engine.MapEvent // Event received from ChargerS
CD *engine.CallDescriptor // initial CD used for debits, updated on each debit
EventCost *engine.EventCost
ExtraDuration time.Duration // keeps the current duration debited on top of what has been asked
LastUsage time.Duration // last requested Duration
TotalUsage time.Duration // sum of lastUsage
NextAutoDebit *time.Time
}
SRun is one billing run for the Session
type Session ¶
type Session struct {
CGRID string
Tenant string
ResourceID string
ClientConnID string // connection ID towards the client so we can recover from passive
EventStart engine.MapEvent // Event which started the session
DebitInterval time.Duration // execute debits for *prepaid runs
SRuns []*SRun // forked based on ChargerS
*utils.ArgDispatcher
// contains filtered or unexported fields
}
Session is the main structure to describe a call
func (*Session) AsExternalSession ¶
func (s *Session) AsExternalSession(sr *SRun, tmz, nodeID string) (aS *ExternalSession)
AsExternalSession returns the session as an ExternalSession using the SRuns given
func (*Session) AsExternalSessions ¶
func (s *Session) AsExternalSessions(tmz, nodeID string) (aSs []*ExternalSession)
AsExternalSessions returns the session as a list of ExternalSession using all SRuns (thread safe)
type SessionS ¶
type SessionS struct {
// contains filtered or unexported fields
}
SessionS represents the session service
func NewSessionS ¶
func NewSessionS(cgrCfg *config.CGRConfig, dm *engine.DataManager, connMgr *engine.ConnManager) *SessionS
NewSessionS constructs a new SessionS instance
func (*SessionS) BiRPCV1GetMaxUsage ¶
func (sS *SessionS) BiRPCV1GetMaxUsage(clnt rpcclient.ClientConnector, ev engine.MapEvent, maxUsage *float64) (err error)
BiRPCV1GetMaxUsage returns the maximum usage as seconds, compatible with OpenSIPS 2.3 DEPRECATED, it will be removed in future versions
func (*SessionS) BiRPCV1InitiateSession ¶
func (sS *SessionS) BiRPCV1InitiateSession(clnt rpcclient.ClientConnector, ev engine.MapEvent, maxUsage *float64) (err error)
BiRPCV1InitiateSession is called on session start, returns the maximum number of seconds the session can last DEPRECATED, it will be removed in future versions Kept for compatibility with OpenSIPS 2.3
func (*SessionS) BiRPCV1ProcessCDR ¶
func (sS *SessionS) BiRPCV1ProcessCDR(clnt rpcclient.ClientConnector, ev engine.MapEvent, rply *string) (err error)
BiRPCV1ProcessCDR should send the CDR to CDRS DEPRECATED, it will be removed in future versions Kept for compatibility with OpenSIPS 2.3
func (*SessionS) BiRPCV1TerminateSession ¶
func (sS *SessionS) BiRPCV1TerminateSession(clnt rpcclient.ClientConnector, ev engine.MapEvent, rply *string) (err error)
BiRPCV1TerminateSession is called on session end, should stop debit loop DEPRECATED, it will be removed in future versions Kept for compatibility with OpenSIPS 2.3
func (*SessionS) BiRPCV1UpdateSession ¶
func (sS *SessionS) BiRPCV1UpdateSession(clnt rpcclient.ClientConnector, ev engine.MapEvent, maxUsage *float64) (err error)
BiRPCV1UpdateSession processes interim updates, returns remaining duration from the RALs DEPRECATED, it will be removed in future versions Kept for compatibility with OpenSIPS 2.3
func (*SessionS) BiRPCv1ActivateSessions ¶
func (sS *SessionS) BiRPCv1ActivateSessions(clnt rpcclient.ClientConnector, sIDs []string, reply *string) (err error)
BiRPCv1ActivateSessions is called to activate a list/all sessions returns utils.ErrPartiallyExecuted in case of errors
func (*SessionS) BiRPCv1AuthorizeEvent ¶
func (sS *SessionS) BiRPCv1AuthorizeEvent(clnt rpcclient.ClientConnector, args *V1AuthorizeArgs, authReply *V1AuthorizeReply) (err error)
BiRPCv1AuthorizeEvent performs authorization for CGREvent based on specific components
func (*SessionS) BiRPCv1AuthorizeEventWithDigest ¶
func (sS *SessionS) BiRPCv1AuthorizeEventWithDigest(clnt rpcclient.ClientConnector, args *V1AuthorizeArgs, authReply *V1AuthorizeReplyWithDigest) (err error)
BiRPCv1AuthorizeEventWithDigest performs authorization for CGREvent based on specific components returning one level fields instead of multiple ones returned by BiRPCv1AuthorizeEvent
func (*SessionS) BiRPCv1DeactivateSessions ¶
func (sS *SessionS) BiRPCv1DeactivateSessions(clnt rpcclient.ClientConnector, sIDs []string, reply *string) (err error)
BiRPCv1DeactivateSessions is called to deactivate a list/all active sessios returns utils.ErrPartiallyExecuted in case of errors
func (*SessionS) BiRPCv1ForceDisconnect ¶
func (sS *SessionS) BiRPCv1ForceDisconnect(clnt rpcclient.ClientConnector, args *utils.SessionFilter, reply *string) (err error)
BiRPCv1ForceDisconnect will force disconnecting sessions matching sessions
func (*SessionS) BiRPCv1GetActiveSessions ¶
func (sS *SessionS) BiRPCv1GetActiveSessions(clnt rpcclient.ClientConnector, args *utils.SessionFilter, reply *[]*ExternalSession) (err error)
BiRPCv1GetActiveSessions returns the list of active sessions based on filter
func (*SessionS) BiRPCv1GetActiveSessionsCount ¶
func (sS *SessionS) BiRPCv1GetActiveSessionsCount(clnt rpcclient.ClientConnector, args *utils.SessionFilter, reply *int) error
BiRPCv1GetActiveSessionsCount counts the active sessions
func (*SessionS) BiRPCv1GetPassiveSessions ¶
func (sS *SessionS) BiRPCv1GetPassiveSessions(clnt rpcclient.ClientConnector, args *utils.SessionFilter, reply *[]*ExternalSession) error
BiRPCv1GetPassiveSessions returns the passive sessions handled by SessionS
func (*SessionS) BiRPCv1GetPassiveSessionsCount ¶
func (sS *SessionS) BiRPCv1GetPassiveSessionsCount(clnt rpcclient.ClientConnector, args *utils.SessionFilter, reply *int) error
BiRPCv1GetPassiveSessionsCount counts the passive sessions handled by the system
func (*SessionS) BiRPCv1InitiateSession ¶
func (sS *SessionS) BiRPCv1InitiateSession(clnt rpcclient.ClientConnector, args *V1InitSessionArgs, rply *V1InitSessionReply) (err error)
BiRPCv1InitiateSession initiates a new session
func (*SessionS) BiRPCv1InitiateSessionWithDigest ¶
func (sS *SessionS) BiRPCv1InitiateSessionWithDigest(clnt rpcclient.ClientConnector, args *V1InitSessionArgs, initReply *V1InitReplyWithDigest) (err error)
BiRPCv1InitiateSessionWithDigest returns the formated result of InitiateSession
func (*SessionS) BiRPCv1ProcessCDR ¶
func (sS *SessionS) BiRPCv1ProcessCDR(clnt rpcclient.ClientConnector, cgrEvWithArgDisp *utils.CGREventWithArgDispatcher, rply *string) (err error)
BiRPCv1ProcessCDR sends the CDR to CDRs
func (*SessionS) BiRPCv1ProcessEvent ¶
func (sS *SessionS) BiRPCv1ProcessEvent(clnt rpcclient.ClientConnector, args *V1ProcessEventArgs, rply *V1ProcessEventReply) (err error)
BiRPCv1ProcessEvent processes one event with the right subsystems based on arguments received
func (*SessionS) BiRPCv1ProcessMessage ¶
func (sS *SessionS) BiRPCv1ProcessMessage(clnt rpcclient.ClientConnector, args *V1ProcessMessageArgs, rply *V1ProcessMessageReply) (err error)
BiRPCv1ProcessMessage processes one event with the right subsystems based on arguments received
func (*SessionS) BiRPCv1RegisterInternalBiJSONConn ¶
func (sS *SessionS) BiRPCv1RegisterInternalBiJSONConn(clnt rpcclient.ClientConnector, ign string, reply *string) error
BiRPCv1RegisterInternalBiJSONConn will register the client for a bidirectional comunication
func (*SessionS) BiRPCv1ReplicateSessions ¶
func (sS *SessionS) BiRPCv1ReplicateSessions(clnt rpcclient.ClientConnector, args ArgsReplicateSessions, reply *string) (err error)
BiRPCv1ReplicateSessions will replicate active sessions to either args.Connections or the internal configured ones args.Filter is used to filter the sessions which are replicated, CGRID is the only one possible for now
func (*SessionS) BiRPCv1SetPassiveSession ¶
func (sS *SessionS) BiRPCv1SetPassiveSession(clnt rpcclient.ClientConnector, s *Session, reply *string) (err error)
BiRPCv1SetPassiveSession used for replicating Sessions
func (*SessionS) BiRPCv1SyncSessions ¶
func (sS *SessionS) BiRPCv1SyncSessions(clnt rpcclient.ClientConnector, ignParam string, reply *string) error
BiRPCv1SyncSessions will sync sessions on demand
func (*SessionS) BiRPCv1TerminateSession ¶
func (sS *SessionS) BiRPCv1TerminateSession(clnt rpcclient.ClientConnector, args *V1TerminateSessionArgs, rply *string) (err error)
BiRPCv1TerminateSession will stop debit loops as well as release any used resources
func (*SessionS) BiRPCv1UpdateSession ¶
func (sS *SessionS) BiRPCv1UpdateSession(clnt rpcclient.ClientConnector, args *V1UpdateSessionArgs, rply *V1UpdateSessionReply) (err error)
BiRPCv1UpdateSession updates an existing session, returning the duration which the session can still last
func (*SessionS) CallBiRPC ¶
func (sS *SessionS) CallBiRPC(clnt rpcclient.ClientConnector, serviceMethod string, args interface{}, reply interface{}) error
CallBiRPC is part of utils.BiRPCServer interface to help internal connections do calls over rpcclient.ClientConnector interface
func (*SessionS) ListenAndServe ¶
ListenAndServe starts the service and binds it to the listen loop
func (*SessionS) OnBiJSONConnect ¶
OnBiJSONConnect is called by rpc2.Client on each new connection
func (*SessionS) OnBiJSONDisconnect ¶
OnBiJSONDisconnect is called by rpc2.Client on each client disconnection
func (*SessionS) RegisterIntBiJConn ¶
func (sS *SessionS) RegisterIntBiJConn(c rpcclient.ClientConnector)
RegisterIntBiJConn is called on internal BiJ connection towards SessionS
type V1AuthorizeArgs ¶
type V1AuthorizeArgs struct {
GetAttributes bool
AuthorizeResources bool
GetMaxUsage bool
ProcessThresholds bool
ProcessStats bool
GetSuppliers bool
ForceDuration bool
SuppliersMaxCost string
SuppliersIgnoreErrors bool
AttributeIDs []string
ThresholdIDs []string
StatIDs []string
*utils.CGREvent
utils.Paginator
*utils.ArgDispatcher
}
V1AuthorizeArgs are options available in auth request
func NewV1AuthorizeArgs ¶
func NewV1AuthorizeArgs(attrs bool, attributeIDs []string, thrslds bool, thresholdIDs []string, statQueues bool, statIDs []string, res, maxUsage, suppls, supplsIgnoreErrs, supplsEventCost bool, cgrEv *utils.CGREvent, argDisp *utils.ArgDispatcher, supplierPaginator utils.Paginator, forceDuration bool) (args *V1AuthorizeArgs)
NewV1AuthorizeArgs is a constructor for V1AuthorizeArgs
func (*V1AuthorizeArgs) ParseFlags ¶
func (args *V1AuthorizeArgs) ParseFlags(flags string)
ParseFlags will populate the V1AuthorizeArgs flags
type V1AuthorizeReply ¶
type V1AuthorizeReply struct {
Attributes *engine.AttrSProcessEventReply
ResourceAllocation *string
MaxUsage time.Duration
Suppliers *engine.SortedSuppliers
ThresholdIDs *[]string
StatQueueIDs *[]string
// contains filtered or unexported fields
}
V1AuthorizeReply are options available in auth reply
func (*V1AuthorizeReply) AsNavigableMap ¶
func (v1AuthReply *V1AuthorizeReply) AsNavigableMap() utils.NavigableMap2
AsNavigableMap is part of engine.NavigableMapper interface
func (*V1AuthorizeReply) SetMaxUsageNeeded ¶
func (v1AuthReply *V1AuthorizeReply) SetMaxUsageNeeded(getMaxUsage bool)
SetMaxUsageNeeded used by agent that use the reply as NavigableMapper
type V1AuthorizeReplyWithDigest ¶
type V1AuthorizeReplyWithDigest struct {
AttributesDigest *string
ResourceAllocation *string
MaxUsage float64 // special treat returning time.Duration.Seconds()
SuppliersDigest *string
Thresholds *string
StatQueues *string
}
V1AuthorizeReplyWithDigest contains return options for auth with digest
type V1InitReplyWithDigest ¶
type V1InitReplyWithDigest struct {
AttributesDigest *string
ResourceAllocation *string
MaxUsage float64
Thresholds *string
StatQueues *string
}
V1InitReplyWithDigest is the formated reply
type V1InitSessionArgs ¶
type V1InitSessionArgs struct {
GetAttributes bool
AllocateResources bool
InitSession bool
ForceDuration bool
ProcessThresholds bool
ProcessStats bool
AttributeIDs []string
ThresholdIDs []string
StatIDs []string
*utils.CGREvent
*utils.ArgDispatcher
}
V1InitSessionArgs are options for session initialization request
func NewV1InitSessionArgs ¶
func NewV1InitSessionArgs(attrs bool, attributeIDs []string, thrslds bool, thresholdIDs []string, stats bool, statIDs []string, resrc, acnt bool, cgrEv *utils.CGREvent, argDisp *utils.ArgDispatcher, forceDuration bool) (args *V1InitSessionArgs)
NewV1InitSessionArgs is a constructor for V1InitSessionArgs
func (*V1InitSessionArgs) ParseFlags ¶
func (args *V1InitSessionArgs) ParseFlags(flags string)
ParseFlags will populate the V1InitSessionArgs flags
type V1InitSessionReply ¶
type V1InitSessionReply struct {
Attributes *engine.AttrSProcessEventReply
ResourceAllocation *string
MaxUsage time.Duration
ThresholdIDs *[]string
StatQueueIDs *[]string
// contains filtered or unexported fields
}
V1InitSessionReply are options for initialization reply
func (*V1InitSessionReply) AsNavigableMap ¶
func (v1Rply *V1InitSessionReply) AsNavigableMap() utils.NavigableMap2
AsNavigableMap is part of engine.NavigableMapper interface
func (*V1InitSessionReply) SetMaxUsageNeeded ¶
func (v1Rply *V1InitSessionReply) SetMaxUsageNeeded(getMaxUsage bool)
SetMaxUsageNeeded used by agent that use the reply as NavigableMapper
type V1ProcessEventArgs ¶
type V1ProcessEventArgs struct {
Flags []string
*utils.CGREvent
utils.Paginator
*utils.ArgDispatcher
}
V1ProcessEventArgs are the options passed to ProcessEvent API
type V1ProcessEventReply ¶
type V1ProcessEventReply struct {
MaxUsage time.Duration
ResourceAllocation *string
Attributes *engine.AttrSProcessEventReply
Suppliers *engine.SortedSuppliers
ThresholdIDs *[]string
StatQueueIDs *[]string
// contains filtered or unexported fields
}
V1ProcessEventReply is the reply for the ProcessEvent API
func (*V1ProcessEventReply) AsNavigableMap ¶
func (v1Rply *V1ProcessEventReply) AsNavigableMap() utils.NavigableMap2
AsNavigableMap is part of engine.NavigableMapper interface
func (*V1ProcessEventReply) SetMaxUsageNeeded ¶
func (v1Rply *V1ProcessEventReply) SetMaxUsageNeeded(getMaxUsage bool)
SetMaxUsageNeeded used by agent that use the reply as NavigableMapper
type V1ProcessMessageArgs ¶
type V1ProcessMessageArgs struct {
GetAttributes bool
AllocateResources bool
Debit bool
ForceDuration bool
ProcessThresholds bool
ProcessStats bool
GetSuppliers bool
SuppliersMaxCost string
SuppliersIgnoreErrors bool
AttributeIDs []string
ThresholdIDs []string
StatIDs []string
*utils.CGREvent
utils.Paginator
*utils.ArgDispatcher
}
V1ProcessMessageArgs are the options passed to ProcessMessage API
func NewV1ProcessMessageArgs ¶
func NewV1ProcessMessageArgs(attrs bool, attributeIDs []string, thds bool, thresholdIDs []string, stats bool, statIDs []string, resrc, acnts, suppls, supplsIgnoreErrs, supplsEventCost bool, cgrEv *utils.CGREvent, argDisp *utils.ArgDispatcher, supplierPaginator utils.Paginator, forceDuration bool) (args *V1ProcessMessageArgs)
NewV1ProcessMessageArgs is a constructor for MessageArgs used by ProcessMessage
func (*V1ProcessMessageArgs) ParseFlags ¶
func (args *V1ProcessMessageArgs) ParseFlags(flags string)
ParseFlags will populate the V1ProcessMessageArgs flags
type V1ProcessMessageReply ¶
type V1ProcessMessageReply struct {
MaxUsage time.Duration
ResourceAllocation *string
Attributes *engine.AttrSProcessEventReply
Suppliers *engine.SortedSuppliers
ThresholdIDs *[]string
StatQueueIDs *[]string
// contains filtered or unexported fields
}
V1ProcessMessageReply is the reply for the ProcessMessage API
func (*V1ProcessMessageReply) AsNavigableMap ¶
func (v1Rply *V1ProcessMessageReply) AsNavigableMap() utils.NavigableMap2
AsNavigableMap is part of engine.NavigableMapper interface
func (*V1ProcessMessageReply) SetMaxUsageNeeded ¶
func (v1Rply *V1ProcessMessageReply) SetMaxUsageNeeded(getMaxUsage bool)
SetMaxUsageNeeded used by agent that use the reply as NavigableMapper
type V1TerminateSessionArgs ¶
type V1TerminateSessionArgs struct {
TerminateSession bool
ForceDuration bool
ReleaseResources bool
ProcessThresholds bool
ProcessStats bool
ThresholdIDs []string
StatIDs []string
*utils.CGREvent
*utils.ArgDispatcher
}
V1TerminateSessionArgs is used as argumen for TerminateSession
func NewV1TerminateSessionArgs ¶
func NewV1TerminateSessionArgs(acnts, resrc, thrds bool, thresholdIDs []string, stats bool, statIDs []string, cgrEv *utils.CGREvent, argDisp *utils.ArgDispatcher, forceDuration bool) (args *V1TerminateSessionArgs)
NewV1TerminateSessionArgs creates a new V1TerminateSessionArgs using the given arguments
func (*V1TerminateSessionArgs) ParseFlags ¶
func (args *V1TerminateSessionArgs) ParseFlags(flags string)
ParseFlags will populate the V1TerminateSessionArgs flags
type V1UpdateSessionArgs ¶
type V1UpdateSessionArgs struct {
GetAttributes bool
UpdateSession bool
ForceDuration bool
AttributeIDs []string
*utils.CGREvent
*utils.ArgDispatcher
}
V1UpdateSessionArgs contains options for session update
func NewV1UpdateSessionArgs ¶
func NewV1UpdateSessionArgs(attrs bool, attributeIDs []string, acnts bool, cgrEv *utils.CGREvent, argDisp *utils.ArgDispatcher, forceDuration bool) (args *V1UpdateSessionArgs)
NewV1UpdateSessionArgs is a constructor for update session arguments
type V1UpdateSessionReply ¶
type V1UpdateSessionReply struct {
Attributes *engine.AttrSProcessEventReply
MaxUsage time.Duration
// contains filtered or unexported fields
}
V1UpdateSessionReply contains options for session update reply
func (*V1UpdateSessionReply) AsNavigableMap ¶
func (v1Rply *V1UpdateSessionReply) AsNavigableMap() utils.NavigableMap2
AsNavigableMap is part of engine.NavigableMapper interface
func (*V1UpdateSessionReply) SetMaxUsageNeeded ¶
func (v1Rply *V1UpdateSessionReply) SetMaxUsageNeeded(getMaxUsage bool)
SetMaxUsageNeeded used by agent that use the reply as NavigableMapper