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

Service

import type { Service } from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.27.0/nats-base-client/internal_mod.ts";
interface Service extends ServiceGroup {
isStopped: boolean;
stopped: Promise<null | Error>;
info(): ServiceInfo;
reset(): void;
stats(): Promise<ServiceStats>;
stop(err?: Error): Promise<null | Error>;
}

§Extends

§Properties

§
isStopped: boolean
[src]

True if the service is stopped

§
stopped: Promise<null | Error>
[src]

A promise that gets resolved to null or Error once the service ends. If an error, then service exited because of an error.

§Methods

§

Returns a service info for the service

§

Returns the identity used by this service

§
reset(): void
[src]

Resets all the stats

§
stats(): Promise<ServiceStats>
[src]

Returns the stats for the service.

§
stop(err?: Error): Promise<null | Error>
[src]

Stop the service returning a promise once the service completes. If the service was stopped due to an error, that promise resolves to the specified error