Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ServiceGroup

import type { ServiceGroup } from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.28.2/nats-base-client/internal_mod.ts";
interface ServiceGroup {
addEndpoint(name: string, opts?: ServiceHandler | EndpointOptions): QueuedIterator<ServiceMsg>;
addGroup(subject?: string, queue?: string): ServiceGroup;
}

§Methods

§
addEndpoint(name: string, opts?: ServiceHandler | EndpointOptions): QueuedIterator<ServiceMsg>
[src]

The name of the endpoint must be a simple subject token with no wildcards

@param name
@param opts

is either a handler or a more complex options which allows a subject, handler, and/or schema

§
addGroup(subject?: string, queue?: string): ServiceGroup
[src]

A group is a subject prefix from which endpoints can be added. Can be empty to allow for prefixes or tokens that are set at runtime without requiring editing of the service. Note that an optional queue can be specified, all endpoints added to the group, will use the specified queue unless the endpoint overrides it. see EndpointOptions and ServiceConfig.

@param subject
@param queue