Documentation ¶
Index ¶
- type CentralSessionController
- func (srv *CentralSessionController) CreateSession(ctx context.Context, request *protos.CreateSessionRequest) (*protos.CreateSessionResponse, error)
- func (srv *CentralSessionController) Disable(ctx context.Context, req *fegprotos.DisableMessage) (*orcprotos.Void, error)
- func (srv *CentralSessionController) Enable(ctx context.Context, void *orcprotos.Void) (*orcprotos.Void, error)
- func (srv *CentralSessionController) GetHealthStatus(ctx context.Context, void *orcprotos.Void) (*fegprotos.HealthStatus, error)
- func (srv *CentralSessionController) TerminateSession(ctx context.Context, request *protos.SessionTerminateRequest) (*protos.SessionTerminateResponse, error)
- func (srv *CentralSessionController) UpdateSession(ctx context.Context, request *protos.UpdateSessionRequest) (*protos.UpdateSessionResponse, error)
- type CentralSessionControllerServerWithHealth
- type CentralSessionControllers
- func (srv *CentralSessionControllers) CreateSession(ctx context.Context, request *protos.CreateSessionRequest) (*protos.CreateSessionResponse, error)
- func (srv *CentralSessionControllers) Disable(ctx context.Context, req *fegprotos.DisableMessage) (*orcprotos.Void, error)
- func (srv *CentralSessionControllers) Enable(ctx context.Context, void *orcprotos.Void) (*orcprotos.Void, error)
- func (srv *CentralSessionControllers) GetHealthStatus(ctx context.Context, void *orcprotos.Void) (*fegprotos.HealthStatus, error)
- func (srv *CentralSessionControllers) TerminateSession(ctx context.Context, request *protos.SessionTerminateRequest) (*protos.SessionTerminateResponse, error)
- func (srv *CentralSessionControllers) UpdateSession(ctx context.Context, request *protos.UpdateSessionRequest) (*protos.UpdateSessionResponse, error)
- type ControllerParam
- type SessionControllerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CentralSessionController ¶
type CentralSessionController struct {
// contains filtered or unexported fields
}
CentralSessionController acts as the gRPC server for accepting calls from gateways to start new UE sessions and retrieve traffic policy and credits.
func NewCentralSessionController ¶
func NewCentralSessionController( creditClient gy.CreditClient, policyClient gx.PolicyClient, dbClient policydb.PolicyDBClient, cfg *SessionControllerConfig, ) *CentralSessionController
NewCentralSessionController constructs a CentralSessionController and registers external handlers
func (*CentralSessionController) CreateSession ¶
func (srv *CentralSessionController) CreateSession( ctx context.Context, request *protos.CreateSessionRequest, ) (*protos.CreateSessionResponse, error)
CreateSession begins a UE session by requesting rules from PCEF and credit from OCS (if RatingGroup is present) and returning them.
func (*CentralSessionController) Disable ¶
func (srv *CentralSessionController) Disable( ctx context.Context, req *fegprotos.DisableMessage, ) (*orcprotos.Void, error)
Disable closes all existing diameter connections and disables connection creation for the time specified in the request
func (*CentralSessionController) Enable ¶
func (srv *CentralSessionController) Enable( ctx context.Context, void *orcprotos.Void, ) (*orcprotos.Void, error)
Enable enables diameter connection creation and gets a connection to the diameter server(s). If creation is already enabled and a connection already exists, Enable has no effect
func (*CentralSessionController) GetHealthStatus ¶
func (srv *CentralSessionController) GetHealthStatus( ctx context.Context, void *orcprotos.Void, ) (*fegprotos.HealthStatus, error)
GetHealthStatus retrieves a health status object which contains the current health of the service
func (*CentralSessionController) TerminateSession ¶
func (srv *CentralSessionController) TerminateSession( ctx context.Context, request *protos.SessionTerminateRequest, ) (*protos.SessionTerminateResponse, error)
TerminateSession handles a session termination by sending single CCR-T on Gx sending CCR-T per rating group on Gy
func (*CentralSessionController) UpdateSession ¶
func (srv *CentralSessionController) UpdateSession( ctx context.Context, request *protos.UpdateSessionRequest, ) (*protos.UpdateSessionResponse, error)
UpdateSession handles periodic updates from gateways that include quota exhaustion and terminations.
type CentralSessionControllerServerWithHealth ¶
type CentralSessionControllerServerWithHealth interface { protos.CentralSessionControllerServer fegprotos.ServiceHealthServer }
CentralSessionControllerServerWithHealth is an interface just to group CentralSessionControllerServer and ServiceHealthServer. This is used by NewCentralSessionControllerWithHealth to be able to return either CentralSessionControllers or CentralSessionController (without S)
func NewCentralSessionControllerDefaultMultiplexWithHealth ¶
func NewCentralSessionControllerDefaultMultiplexWithHealth( controlParam []*ControllerParam, dbClient policydb.PolicyDBClient, ) (CentralSessionControllerServerWithHealth, error)
NewCentralSessionControllerDefaultMultiplesWithHealth returns a different type of controller depending on the amount of servers configured. In case only one server is configured, there is no need to calculate where this subscriber should be sent, so in that case we return CentralSessionController (without S). In case of multiple servers configured, it creates a CentralSessionControllers and uses a **StaticMultiplexByIMSI** as a multiplexor
type CentralSessionControllers ¶
type CentralSessionControllers struct {
// contains filtered or unexported fields
}
func NewCentralSessionControllers ¶
func NewCentralSessionControllers( controlParam []*ControllerParam, dbClient policydb.PolicyDBClient, mux multiplex.Multiplexor, ) *CentralSessionControllers
NewCentralSessionControllers creates centralControllers which is a slice of centralController. This should be used only if more than one server is configred
func (*CentralSessionControllers) CreateSession ¶
func (srv *CentralSessionControllers) CreateSession( ctx context.Context, request *protos.CreateSessionRequest, ) (*protos.CreateSessionResponse, error)
CreateSession begins a UE session by requesting rules from PCEF and credit from OCS (if RatingGroup is present) and returning them.
func (*CentralSessionControllers) Disable ¶
func (srv *CentralSessionControllers) Disable( ctx context.Context, req *fegprotos.DisableMessage, ) (*orcprotos.Void, error)
Disable closes all existing diameter connections and disables connection creation for the time specified in the request
func (*CentralSessionControllers) Enable ¶
func (srv *CentralSessionControllers) Enable( ctx context.Context, void *orcprotos.Void, ) (*orcprotos.Void, error)
Enable enables diameter connection creation and gets a connection to the diameter server(s). if creation is already enabled and a connection already exists, enable has no effect
func (*CentralSessionControllers) GetHealthStatus ¶
func (srv *CentralSessionControllers) GetHealthStatus( ctx context.Context, void *orcprotos.Void, ) (*fegprotos.HealthStatus, error)
GetHealthStatus retrieves a health status object which contains the current health of the service
func (*CentralSessionControllers) TerminateSession ¶
func (srv *CentralSessionControllers) TerminateSession( ctx context.Context, request *protos.SessionTerminateRequest, ) (*protos.SessionTerminateResponse, error)
TerminateSession handles a session termination by sending single ccr-t on gx sending ccr-t per rating group on gy.
func (*CentralSessionControllers) UpdateSession ¶
func (srv *CentralSessionControllers) UpdateSession( ctx context.Context, request *protos.UpdateSessionRequest, ) (*protos.UpdateSessionResponse, error)
UpdateSession handles periodic updates from gateways that include quota exhaustion and terminations
type ControllerParam ¶
type ControllerParam struct { CreditClient gy.CreditClient PolicyClient gx.PolicyClient Config *SessionControllerConfig }
type SessionControllerConfig ¶
type SessionControllerConfig struct { OCSConfig *diameter.DiameterServerConfig PCRFConfig *diameter.DiameterServerConfig RequestTimeout time.Duration InitMethod gy.InitMethod // This flag enables a specific type of behavior. // 1. Ensures a Gy CCR-I is called in CreateSession when Gx CCR-I succeeds, // even if there is no rating group returned by Gx CCR-A. // 2. Ensures all Multi Service Credit Control entities have 2001 result // code for CreateSession to succeed. UseGyForAuthOnly bool DisableGx bool DisableGy bool }
SessionControllerConfig stores all the needed configuration for running gx and gy clients