Table of Contents

Method AddServiceAsync

Namespace
NATS.Client.Services
Assembly
NATS.Client.Services.dll

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 string

Service name.

version string

Service SemVer version.

queueGroup string

Optional queue group (default: "q")

cancellationToken CancellationToken

A 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 NatsSvcConfig

Service configuration.

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

ValueTask<INatsSvcServer>

NATS Service instance.