IGlobalScaleService
in
Service related to sending data from instances in a global scale setup.
This service is only available when the globalsiteselector application is enabled.
Tags
Table of Contents
Methods
- decodePayload() : array<string|int, mixed>
- Decode a receiving payload.
- sendToSecondary() : string
- Send a payload from the primary server to the secondary server.
Methods
decodePayload()
Decode a receiving payload.
public
decodePayload(non-empty-string $jwt) : array<string|int, mixed>
The payload is signed and will expire automatically in 5 min.
Parameters
- $jwt : non-empty-string
-
The payload encoded as a JWT
Tags
Return values
array<string|int, mixed> —The original payload as sent by IGlobalScaleService::sendToSecondary
sendToSecondary()
Send a payload from the primary server to the secondary server.
public
sendToSecondary(IUser $user, non-empty-string $path, array<string|int, mixed> $payload) : string
The payload will be signed and will expire automatically in 5 min. The payload can then be decoded on the receiving end with IGlobalScaleService::decodePayload().
Parameters
- $user : IUser
- $path : non-empty-string
- $payload : array<string|int, mixed>
Tags
Return values
string —The url of the secondary