Class AdminSocket
A local Unix socket through which the server's own machine manages it, e.g. uniform-chat-server manage while the server runs as a service: requests through it act as a server admin without an access token, and may use calls that the network never sees: the status and the settings.
Inherited Members
Namespace: Uniform.Matrix.Server.Http
Assembly: Uniform.Matrix.Server.dll
Syntax
public static class AdminSocket
Remarks
Who may connect is decided by the socket file's permissions, e.g. root and the service's group; the server serves it next to its other addresses, as http://unix: followed by the path.
Fields
| Edit this page View SourcePrefix
Prefix of the calls that are answered on the socket only, see ManagementEndpoints.
Declaration
public const string Prefix = "/_uniform/admin/v1"
Field Value
| Type | Description |
|---|---|
| string |
Requester
The requester of socket requests, an admin without an account.
Declaration
public static readonly Requester Requester
Field Value
| Type | Description |
|---|---|
| Requester |
SettingsPath
The server's settings: values and sources; /apply and /save below it change them.
Declaration
public const string SettingsPath = "/_uniform/admin/v1/settings"
Field Value
| Type | Description |
|---|---|
| string |
StatusPath
The server's state for the manager: addresses, counters and where its files are.
Declaration
public const string StatusPath = "/_uniform/admin/v1/status"
Field Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceIsAdminSocket(HttpContext)
Return whether the request came through the admin socket.
Declaration
public static bool IsAdminSocket(this HttpContext http)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | http |
Returns
| Type | Description |
|---|---|
| bool |
MarkAdminSocket(KestrelServerOptions, string)
Mark connections to the socket at path among the server's endpoints, so IsAdminSocket(HttpContext) knows their requests.
Declaration
public static KestrelServerOptions MarkAdminSocket(this KestrelServerOptions kestrel, string path)
Parameters
| Type | Name | Description |
|---|---|---|
| KestrelServerOptions | kestrel | |
| string | path |
Returns
| Type | Description |
|---|---|
| KestrelServerOptions |