Method AddServiceAsync
AddServiceAsync(string, string, string, CancellationToken)
Adds a new service.
public ValueTask<INatsSvcServer> AddServiceAsync(string name, string version, string queueGroup = "q", CancellationToken cancellationToken = default)
Parameters
name
stringService name.
version
stringService SemVer version.
queueGroup
stringOptional queue group (default: "q")
cancellationToken
CancellationTokenA CancellationToken used to cancel the API call.
Returns
- ValueTask<INatsSvcServer>
NATS Service instance.
AddServiceAsync(NatsSvcConfig, CancellationToken)
Adds a new service.
public ValueTask<INatsSvcServer> AddServiceAsync(NatsSvcConfig config, CancellationToken cancellationToken = default)
Parameters
config
NatsSvcConfigService configuration.
cancellationToken
CancellationTokenA CancellationToken used to cancel the API call.
Returns
- ValueTask<INatsSvcServer>
NATS Service instance.