-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connection diagnostics and key set logging capabilities (#2279)
* Connection diagnostics and key set logging capabilities * Add TTL and retention settings for messages and writer groups * Ensure complex types are loaded when synchronizing subscription state
- Loading branch information
1 parent
d55cd10
commit f8a0fea
Showing
36 changed files
with
833 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/Azure.IIoT.OpcUa.Publisher.Models/src/ChannelDiagnosticModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// ------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information. | ||
// ------------------------------------------------------------ | ||
|
||
namespace Azure.IIoT.OpcUa.Publisher.Models | ||
{ | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
/// <summary> | ||
/// Channel token. Can be used to decrypt encrypted | ||
/// capture files. | ||
/// </summary> | ||
[DataContract] | ||
public record class ChannelDiagnosticModel | ||
{ | ||
/// <summary> | ||
/// The id assigned to the channel that the token | ||
/// belongs to. | ||
/// </summary> | ||
[DataMember(Name = "channelId", Order = 0)] | ||
public required uint ChannelId { get; init; } | ||
|
||
/// <summary> | ||
/// The id assigned to the token. | ||
/// </summary> | ||
[DataMember(Name = "tokenId", Order = 1)] | ||
public required uint TokenId { get; init; } | ||
|
||
/// <summary> | ||
/// When the token was created by the server | ||
/// (refers to the server's clock). | ||
/// </summary> | ||
[DataMember(Name = "createdAt", Order = 2)] | ||
public required DateTime CreatedAt { get; init; } | ||
|
||
/// <summary> | ||
/// The lifetime of the token | ||
/// </summary> | ||
[DataMember(Name = "lifetime", Order = 3)] | ||
public required TimeSpan Lifetime { get; init; } | ||
|
||
/// <summary> | ||
/// Client keys | ||
/// </summary> | ||
[DataMember(Name = "client", Order = 4, | ||
EmitDefaultValue = false)] | ||
public ChannelKeyModel? Client { get; init; } | ||
|
||
/// <summary> | ||
/// Server keys | ||
/// </summary> | ||
[DataMember(Name = "aerver", Order = 5, | ||
EmitDefaultValue = false)] | ||
public ChannelKeyModel? Server { get; init; } | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/Azure.IIoT.OpcUa.Publisher.Models/src/ChannelKeyModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// ------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information. | ||
// ------------------------------------------------------------ | ||
|
||
namespace Azure.IIoT.OpcUa.Publisher.Models | ||
{ | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
|
||
/// <summary> | ||
/// Channel token key model. | ||
/// </summary> | ||
[DataContract] | ||
public record class ChannelKeyModel | ||
{ | ||
/// <summary> | ||
/// Iv | ||
/// </summary> | ||
[DataMember(Name = "iv", Order = 0)] | ||
public required IReadOnlyList<byte> Iv { get; init; } | ||
|
||
/// <summary> | ||
/// Key | ||
/// </summary> | ||
[DataMember(Name = "key", Order = 1)] | ||
public required IReadOnlyList<byte> Key { get; init; } | ||
|
||
/// <summary> | ||
/// Signature length | ||
/// </summary> | ||
[DataMember(Name = "sigLen", Order = 2)] | ||
public required int SigLen { get; init; } | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
src/Azure.IIoT.OpcUa.Publisher.Models/src/ConnectionDiagnosticModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// ------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information. | ||
// ------------------------------------------------------------ | ||
|
||
namespace Azure.IIoT.OpcUa.Publisher.Models | ||
{ | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
/// <summary> | ||
/// Connection / session diagnostics model | ||
/// </summary> | ||
[DataContract] | ||
public record class ConnectionDiagnosticModel | ||
{ | ||
/// <summary> | ||
/// Timestamp of the diagnostic information | ||
/// </summary> | ||
[DataMember(Name = "timeStamp", Order = 0)] | ||
public required DateTimeOffset TimeStamp { get; init; } | ||
|
||
/// <summary> | ||
/// The connection information specified by user. | ||
/// </summary> | ||
[DataMember(Name = "connection", Order = 1)] | ||
public required ConnectionModel Connection { get; init; } | ||
|
||
/// <summary> | ||
/// Effective remote ip address used for the | ||
/// connection if connected. Empty if disconnected. | ||
/// </summary> | ||
[DataMember(Name = "remoteIpAddress", Order = 2, | ||
EmitDefaultValue = false)] | ||
public string? RemoteIpAddress { get; init; } | ||
|
||
/// <summary> | ||
/// The effective remote port used when connected, | ||
/// null if disconnected. | ||
/// </summary> | ||
[DataMember(Name = "remotePort", Order = 3, | ||
EmitDefaultValue = false)] | ||
public int? RemotePort { get; init; } | ||
|
||
/// <summary> | ||
/// Effective local ip address used for the connection | ||
/// if connected. Empty if disconnected. | ||
/// </summary> | ||
[DataMember(Name = "localIpAddress", Order = 4, | ||
EmitDefaultValue = false)] | ||
public string? LocalIpAddress { get; init; } | ||
|
||
/// <summary> | ||
/// The effective local port used when connected, | ||
/// null if disconnected. | ||
/// </summary> | ||
[DataMember(Name = "localPort", Order = 5, | ||
EmitDefaultValue = false)] | ||
public int? LocalPort { get; init; } | ||
|
||
/// <summary> | ||
/// Channel diagnostics | ||
/// </summary> | ||
[DataMember(Name = "channelDiagnostics", Order = 6, | ||
EmitDefaultValue = false)] | ||
public ChannelDiagnosticModel? ChannelDiagnostics { get; init; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.