Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADDED] Gatewayz endpoint #1016

Merged
merged 1 commit into from
May 28, 2019
Merged

[ADDED] Gatewayz endpoint #1016

merged 1 commit into from
May 28, 2019

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented May 27, 2019

Such endpoint will list the gateway/cluster name, address and port
then list of outbound/inbound connections.
For each remote gateway there will be at most one outbound connection.
There can be 0 or more inbound connections for the same remote
gateway.

For each of these outbound/inbound connection, the connection info
similar to Connz is reported. Optionally, one can include the
interest mode/stats for each account.

Here are possible options:

  • No specific options

http://host:port/gatewayz

  • Limit to specific remote gateway, say name "B":

http://host:port/gatewayz/gw_name=B

  • Include accounts

http://host:port/gatewayz/accs=1

  • Specific account, say "acc_1". Note that accs=1 is not required then

http://host:port/gatewayz/acc_name=acc_1

  • Above options can be mixed: specific remote gateway (B) and accounts
    reported

http://host:port/gatewayz/gw_name=B&accs=1

Signed-off-by: Ivan Kozlovic ivan@synadia.com

@derekcollison
Copy link
Member

Since we have limit to we also accept offset? How is order determined?

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, we just need offset if we support limit and a deterministic account order to page through them.

@kozlovic
Copy link
Member Author

@derekcollison As I mentioned the other day on the phone, no, I don't have offset since there are accounts per each GW connection (outbound and inbound). I am not sure how it would make sense to have offset, even if you were to limit to a single GW and account, since there are both outbound and possibly multiple inbounds that would be displayed.

@derekcollison
Copy link
Member

If you limit the number of accounts displayed feels like you should be able to page through them or at least determine sort order. WDYT?

@kozlovic
Copy link
Member Author

The difficulty here is that unlike connz, there are possibly different lists of accounts for each gateway connection displayed on the same page. So may be a challenge. I will see what I can do.

@derekcollison
Copy link
Member

Maybe for 2.0 remove limit and we can take more time to think through how to present accounts?

@kozlovic
Copy link
Member Author

That's fair. Let me remove limits from this PR for now.

@derekcollison
Copy link
Member

Sounds good.

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Such endpoint will list the gateway/cluster name, address and port
then list of outbound/inbound connections.
For each remote gateway there will be at most one outbound connection.
There can be 0 or more inbound connections for the same remote
gateway.

For each of these outbound/inbound connection, the connection info
similar to Connz is reported. Optionally, one can include the
interest mode/stats for each account.

Here are possible options:

* No specific options

http://host:port/gatewayz

* Limit to specific remote gateway, say name "B":

http://host:port/gatewayz/gw_name=B

* Include accounts (default limit to 1024 accounts)

http://host:port/gatewayz/accs=1

* Specific limit, say 200 (note accs=1 in this case is optional)

http://host:port/gatewayz/accs=1&accs_limit=200

* Specific account, say "acc_1". Note that accs=1 is not required then

http://host:port/gatewayz/acc_name=acc_1

* Above options can be mixed: specific remote gateway (B), with 100
  accounts reported

http://host:port/gatewayz/gw_name=B&accs_limit=200

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic kozlovic merged commit fed8ee0 into master May 28, 2019
@kozlovic kozlovic deleted the gatewayz branch May 28, 2019 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants