Class ChronicleOptions
Represents the settings for connecting to Chronicle.
public class ChronicleOptions
- Inheritance
-
ChronicleOptions
- Derived
- Inherited Members
Remarks
Using the default constructor initializes the options with the development connection string (Cratis.Chronicle.Connections.ChronicleConnectionString.Development), which includes the default development client credentials. This is intended for local development and testing only.
Constructors
ChronicleOptions()
Initializes a new instance of the ChronicleOptions class.
public ChronicleOptions()
Remarks
This initializes the options with the development connection string (Cratis.Chronicle.Connections.ChronicleConnectionString.Development), which includes the default development client credentials.
ChronicleOptions(ChronicleConnectionString, JsonSerializerOptions?, ConcurrencyOptions?, bool, int)
Represents the settings for connecting to Chronicle.
public ChronicleOptions(ChronicleConnectionString connectionString, JsonSerializerOptions? jsonSerializerOptions = null, ConcurrencyOptions? concurrencyOptions = null, bool autoDiscoverAndRegister = true, int connectTimeout = 5)
Parameters
connectionStringChronicleConnectionStringCratis.Chronicle.Connections.ChronicleConnectionString to use.
jsonSerializerOptionsJsonSerializerOptionsOptional JsonSerializerOptions to use. Will revert to defaults if not configured.
concurrencyOptionsConcurrencyOptionsOptional ConcurrencyOptions to use. Will revert to default if not configured.
autoDiscoverAndRegisterboolOptional disable automatic discovery of artifacts and registering these.
connectTimeoutintOptional timeout when connecting in seconds. Defaults to 5.
Remarks
Using the default constructor initializes the options with the development connection string (Cratis.Chronicle.Connections.ChronicleConnectionString.Development), which includes the default development client credentials. This is intended for local development and testing only.
Properties
Authentication
Gets or sets the authentication configuration.
public Authentication Authentication { get; set; }
Property Value
AutoDiscoverAndRegister
Gets a value indicating whether to automatically discover and register artifacts.
public bool AutoDiscoverAndRegister { get; set; }
Property Value
ClaimsBasedNamespaceResolverClaimType
Gets or sets the claim type to use for claims-based namespace resolution. This is used by the ClaimsBasedNamespaceResolver when configured via the WithClaimsBasedNamespaceResolver extension method.
public string ClaimsBasedNamespaceResolverClaimType { get; set; }
Property Value
ConcurrencyOptions
Gets the ConcurrencyOptions to use for concurrency management.
public ConcurrencyOptions ConcurrencyOptions { get; set; }
Property Value
ConnectTimeout
Gets the timeout when connecting in seconds.
public int ConnectTimeout { get; set; }
Property Value
ConnectionString
Gets the Cratis.Chronicle.Connections.ChronicleConnectionString to use.
public ChronicleConnectionString ConnectionString { get; set; }
Property Value
- ChronicleConnectionString
EnableEventTypeGenerationValidation
Gets or sets a value indicating whether event type generation validation is enabled. When false (the default), the client asks the Kernel to bypass migration chain validation when registering event types at generation 2 or higher. Set to true to opt into strict migration chain validation.
public bool EnableEventTypeGenerationValidation { get; set; }
Property Value
Remarks
The Kernel only honours this flag when running the development image. The production image always enforces validation unconditionally, regardless of the value sent by the client.
The default is false so that early-stage schema development works without any explicit configuration. Set to true to opt into strict migration chain validation on the development Kernel image.
JsonSerializerOptions
Gets the JsonSerializerOptions to use.
public JsonSerializerOptions JsonSerializerOptions { get; set; }
Property Value
ManagementPort
Gets or sets the port for the Management API and well-known certificate endpoint.
public int ManagementPort { get; set; }
Property Value
MaxReceiveMessageSize
Gets or sets the maximum receive message size in bytes for gRPC messages. Defaults to 100 MB.
public int? MaxReceiveMessageSize { get; set; }
Property Value
- int?
MaxSendMessageSize
Gets or sets the maximum send message size in bytes for gRPC messages. Defaults to 100 MB.
public int? MaxSendMessageSize { get; set; }
Property Value
- int?
ProgramIdentifier
Gets or sets the program identifier.
public string ProgramIdentifier { get; set; }
Property Value
SoftwareCommit
Gets or sets the software commit SHA. Defaults to the commit SHA from the entry assembly's (your application's) AssemblyInformationalVersion metadata (the portion after the '+' separator). This is included in the root causation to track which commit of your application is running.
public string SoftwareCommit { get; set; }
Property Value
SoftwareVersion
Gets or sets the software version. Defaults to the version of the entry assembly (your application), extracted from the AssemblyInformationalVersion or AssemblyVersion attribute. This is included in the root causation to track which version of your application is running.
public string SoftwareVersion { get; set; }
Property Value
Tls
Gets or sets the TLS configuration.
public Tls Tls { get; set; }
Property Value
Methods
FromConnectionString(ChronicleConnectionString)
Create a ChronicleOptions from a Cratis.Chronicle.Connections.ChronicleConnectionString.
public static ChronicleOptions FromConnectionString(ChronicleConnectionString connectionString)
Parameters
connectionStringChronicleConnectionStringCratis.Chronicle.Connections.ChronicleConnectionString to create from.
Returns
- ChronicleOptions
A new ChronicleOptions.
FromConnectionString(string)
Create a ChronicleOptions from a connection string.
public static ChronicleOptions FromConnectionString(string connectionString)
Parameters
connectionStringstringConnection string to create from.
Returns
- ChronicleOptions
A new ChronicleOptions.
FromDevelopmentConnectionString()
Create a ChronicleOptions from the development connection string.
public static ChronicleOptions FromDevelopmentConnectionString()
Returns
- ChronicleOptions
A new ChronicleOptions configured for development.
Remarks
This is a convenience method for quickly creating options for development purposes. It uses the default development connection string which points to localhost with the default development client credentials. This is not intended for production use and should only be used for local development and testing. For production scenarios, it's recommended to explicitly configure the connection string and other options as needed.