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.
20 lines
536 B
C#
20 lines
536 B
C#
using MediaBrowser.Model.Dto;
|
|
|
|
namespace MediaBrowser.Controller.Session;
|
|
|
|
/// <summary>
|
|
/// A session held by one instance, as the other instances see it.
|
|
/// </summary>
|
|
public sealed class SessionDirectoryEntry
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the identity of the instance holding the connection.
|
|
/// </summary>
|
|
public string OwnerPod { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the session as its owner last rendered it.
|
|
/// </summary>
|
|
public SessionInfoDto? Session { get; set; }
|
|
}
|