mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 14:48:43 +05:00
Updated Panic API on cores
This commit is contained in:
committed by
Dan Christian Bogos
parent
bc5f1b5e10
commit
51e4159be0
@@ -68,12 +68,7 @@ func (cS *CoreSv1) StopMemoryProfiling(ctx *context.Context, args *utils.TenantW
|
||||
return cS.cS.V1StopMemoryProfiling(ctx, args, reply)
|
||||
}
|
||||
|
||||
type PanicMessageArgs struct {
|
||||
Tenant string
|
||||
APIOpts map[string]interface{}
|
||||
Message string
|
||||
}
|
||||
|
||||
func (cS *CoreSv1) Panic(args *PanicMessageArgs, _ *string) error {
|
||||
panic(args.Message)
|
||||
// Panic is used print the Message sent as a panic
|
||||
func (cS *CoreSv1) Panic(ctx *context.Context, args *utils.PanicMessageArgs, reply *string) error {
|
||||
return cS.cS.V1Panic(ctx, args, reply)
|
||||
}
|
||||
|
||||
@@ -258,3 +258,8 @@ func (cS *CoreS) V1StopMemoryProfiling(_ *context.Context, _ *utils.TenantWithAP
|
||||
*reply = utils.OK
|
||||
return nil
|
||||
}
|
||||
|
||||
// V1Panic is used print the Message sent as a panic
|
||||
func (cS *CoreS) V1Panic(_ *context.Context, args *utils.PanicMessageArgs, _ *string) error {
|
||||
panic(args.Message)
|
||||
}
|
||||
|
||||
@@ -780,6 +780,12 @@ type MemoryPrf struct {
|
||||
APIOpts map[string]interface{}
|
||||
}
|
||||
|
||||
type PanicMessageArgs struct {
|
||||
Tenant string
|
||||
APIOpts map[string]interface{}
|
||||
Message string
|
||||
}
|
||||
|
||||
// SetIndexesArg the API arguments needed for seting an index
|
||||
type SetIndexesArg struct {
|
||||
IdxItmType string
|
||||
|
||||
Reference in New Issue
Block a user