Class GrpcClientOptions
Per-client gRPC choices: metadata added to every call from the client, the hook that builds
per-call metadata, and the default deadline. Values layer from ProtoTest:Grpc:Client over the
code-based registration; the legacy ProtoTest:Grpc section still binds as a deprecated
fallback, so an existing suite keeps working.
public sealed class GrpcClientOptions : IProtoConfigurableOptions
- Inheritance
-
GrpcClientOptions
- Implements
- Inherited Members
- Extension Methods
Fields
ConfigurationSectionName
public const string ConfigurationSectionName = "ProtoTest:Grpc:Client"
Field Value
LegacyConfigurationSectionName
The pre-1.1 section; it still binds, after ConfigurationSectionName. Deprecated.
public const string LegacyConfigurationSectionName = "ProtoTest:Grpc"
Field Value
Properties
ConfigureMetadata
Builds metadata per call with access to the test context - the hook for token auth.
public Action<ProtoExecutionContext, Metadata>? ConfigureMetadata { get; set; }
Property Value
DefaultDeadline
A default deadline applied when a call does not name one.
public TimeSpan? DefaultDeadline { get; set; }
Property Value
Metadata
Metadata added to every call from this client, keyed by its metadata name.
public IDictionary<string, string> Metadata { get; set; }
Property Value
SensitiveMetadataKeys
Metadata keys whose values are redacted in the trace. Matching is case-insensitive and by
substring, so authorization also covers proxy-authorization. The built-in test
user's Base64 identity travels as prototest-user metadata and is redacted by default.
Configuration under ProtoTest:Grpc:Client:SensitiveMetadataKeys extends these defaults.
public List<string> SensitiveMetadataKeys { get; set; }
Property Value
Methods
Validate()
Validates the resolved options once, after code callbacks and configuration have been applied. A bad value is a configuration error and must throw here rather than fail the first test that happens to use it. The default does nothing.
public void Validate()