Skip to content

Commit

Permalink
Merge pull request #221 from nats-io/service-api-info-schema
Browse files Browse the repository at this point in the history
Change INFO response to contain endpoint details
  • Loading branch information
Jarema authored May 30, 2023
2 parents 4c94387 + 2974b43 commit 21a6a83
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions adr/ADR-32.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,26 @@ Returns a JSON having the following structure:
*/
description: string,
/**
* An array of all endpoint subjects
* An array of info for all service endpoints
*/
subjects: string[]
endpoints: EndpointInfo[]
}
```

```typescript
// EndpointInfo
{
name: string,
subject: string,
/**
* Metadata of a specific endpoint
*/
metadata: Record<string,string>,
}
```

All the fields above map 1-1 to the metadata provided when the service was
created. Note that `subjects` is a list of all subjects on which endpoints were
registered.
created.

The type for this is `io.nats.micro.v1.info_response`.

Expand Down Expand Up @@ -210,10 +221,6 @@ The type for this is `io.nats.micro.v1.ping_response`.
* The subject on which the endpoint is registered
*/
subject: string;
/**
* Endpoint specific metadata
*/
metadata: Record<string,string>;
/**
* The number of requests received by the endpoint
*/
Expand Down

0 comments on commit 21a6a83

Please sign in to comment.