Skip to content

Commit e033329

Browse files
committed
Rename variables
1 parent 4b2010c commit e033329

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/SeqCli/Forwarder/Channel/ApiKeyForwardingChannelWrapper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void LoadChannels()
2525
{
2626
foreach (var directoryPath in Directory.EnumerateDirectories(BufferPath))
2727
{
28-
if (directoryPath.Equals(GetStorePath(SeqCliConnectionChannelName)))
28+
if (directoryPath.Equals(GetStorePath(SeqCliConnectionChannelId)))
2929
{
3030
// data was stored when not using API key forwarding
3131
continue;
@@ -59,7 +59,7 @@ public override ForwardingChannel GetForwardingChannel(string? requestApiKey)
5959
return channel;
6060
}
6161

62-
var channelId = ApiKeyToName(requestApiKey);
62+
var channelId = ApiKeyToId(requestApiKey);
6363
var created = OpenOrCreateChannel(channelId, requestApiKey);
6464
var store = new SystemStoreDirectory(GetStorePath(channelId));
6565
store.WriteApiKey(Config, requestApiKey ?? "");
@@ -68,7 +68,7 @@ public override ForwardingChannel GetForwardingChannel(string? requestApiKey)
6868
}
6969
}
7070

71-
string ApiKeyToName(string? apiKey)
71+
string ApiKeyToId(string? apiKey)
7272
{
7373
return string.IsNullOrEmpty(apiKey) ? EmptyApiKeyChannelId : Guid.NewGuid().ToString();
7474
}

src/SeqCli/Forwarder/Channel/ForwardingChannelWrapper.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ namespace SeqCli.Forwarder.Channel;
1111

1212
internal abstract class ForwardingChannelWrapper(string bufferPath, SeqConnection connection, SeqCliConfig config)
1313
{
14-
protected const string SeqCliConnectionChannelName = "SeqCliConnection";
14+
protected const string SeqCliConnectionChannelId = "SeqCliConnection";
1515
protected readonly string BufferPath = bufferPath;
1616
protected readonly SeqCliConfig Config = config;
1717
protected readonly CancellationTokenSource ShutdownTokenSource = new();
1818
protected readonly Lock ChannelsSync = new();
1919

20-
// <param name="name">The name used for the channel storage on the file system and in memory.</param>
20+
// <param name="id">The id used for the channel storage on the file system.</param>
2121
// <param name="apiKey">The apiKey that will be used to connect to the downstream Seq instance.</param>
22-
protected ForwardingChannel OpenOrCreateChannel(string name, string? apiKey)
22+
protected ForwardingChannel OpenOrCreateChannel(string id, string? apiKey)
2323
{
24-
var storePath = GetStorePath(name);
24+
var storePath = GetStorePath(id);
2525
var store = new SystemStoreDirectory(storePath);
2626

2727
Log.ForContext<ForwardingChannelWrapper>().Information("Opening local buffer in {StorePath}", storePath);
@@ -42,8 +42,8 @@ protected ForwardingChannel OpenOrCreateChannel(string name, string? apiKey)
4242

4343
public abstract Task StopAsync();
4444

45-
protected string GetStorePath(string name)
45+
protected string GetStorePath(string id)
4646
{
47-
return Path.Combine(BufferPath, name);
47+
return Path.Combine(BufferPath, id);
4848
}
4949
}

src/SeqCli/Forwarder/Channel/SeqCliConnectionForwardingChannelWrapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class SeqCliConnectionForwardingChannelWrapper: ForwardingChannelWrapper
1212

1313
public SeqCliConnectionForwardingChannelWrapper(string bufferPath, SeqConnection connection, SeqCliConfig config, string? seqCliApiKey): base(bufferPath, connection, config)
1414
{
15-
_seqCliConnectionChannel = OpenOrCreateChannel(SeqCliConnectionChannelName, seqCliApiKey);
15+
_seqCliConnectionChannel = OpenOrCreateChannel(SeqCliConnectionChannelId, seqCliApiKey);
1616
}
1717

1818
public override ForwardingChannel GetForwardingChannel(string? _)

0 commit comments

Comments
 (0)