Skip to content

Commit

Permalink
Add Metadata to KV Bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmk committed Feb 17, 2025
1 parent 0e2e280 commit e926d4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/NATS.Client.KeyValueStore/NatsKVConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public record NatsKVConfig
/// Sources defines the configuration for sources of a KeyValue store.
/// </summary>
public ICollection<StreamSource>? Sources { get; set; }

/// <summary>
/// Additional metadata for the Bucket
/// </summary>
public IDictionary<string, string>? Metadata { get; set; }
}

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/NATS.Client.KeyValueStore/NatsKVContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ private static StreamConfig CreateStreamConfig(NatsKVConfig config)
MirrorDirect = mirrorDirect,
Sources = sources,
Retention = StreamConfigRetention.Limits, // from ADR-8
Metadata = config.Metadata,
};

return streamConfig;
Expand Down

0 comments on commit e926d4b

Please sign in to comment.