Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context is a type used as a way to pass dynamic parameters coming from specific calls during execution of service (for example CreateSessionRequest)
func (*Context) GetIMSI ¶
GetContext returns IMSI in uint64 format That IMSI can come from different sources like IMSI string or SessionId
func (*Context) WithIMSI ¶
WithIMSI adds imsi to context from a IMSI string (from IMSI123456789012345 123456789012345)
func (*Context) WithSessionId ¶
WithSessionId adds imsi to context from sessionId (from IMSI123456789012345-54321 to 123456789012345)
type Multiplexor ¶
type Multiplexor interface { // GetIndex return an index based on the implementation of Multiplexor GetIndex(*Context) (int, error) }
Multiplexor interface has to be implemented by any new Multiplexor. Multiplexor can be loaded with data during creation and we can pass some dynamic parameters coming from each requests (using context)
func NewStaticMultiplexByIMSI ¶
func NewStaticMultiplexByIMSI(numServers int) (Multiplexor, error)
NewStaticMultiplexByIMSI creates a StaticMultiplexByIMSI with a specific number of servers That number must be specified before service is started. Context must be used to pass dynamic data coming during execution of service
type StaticMultiplexByIMSI ¶
type StaticMultiplexByIMSI struct {
// contains filtered or unexported fields
}
StaticMultiplexByIMSI contains is a basic Multiplexor that distribuites each IMSI to a specific index based on the IMSImod(numServers)