00d0765152
Publish every session to valkey with the instance holding it, and route a command for a non-local session to its owner over a per-instance pub/sub channel. Entries expire, so a dead instance leaves the directory.
24 lines
696 B
C#
24 lines
696 B
C#
namespace MediaBrowser.Controller.Session;
|
|
|
|
/// <summary>
|
|
/// An envelope addressed to one instance. <see cref="Kind"/> names the payload so that features other
|
|
/// than session routing can share the same channel.
|
|
/// </summary>
|
|
public sealed class PodMessage
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the payload discriminator.
|
|
/// </summary>
|
|
public string Kind { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the identity of the sending instance.
|
|
/// </summary>
|
|
public string OriginPod { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the serialized payload.
|
|
/// </summary>
|
|
public string Payload { get; set; } = string.Empty;
|
|
}
|