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

Exported services CLI and docs #1284

Open
4 tasks done
dhiaayachi opened this issue Sep 28, 2024 · 0 comments
Open
4 tasks done

Exported services CLI and docs #1284

dhiaayachi opened this issue Sep 28, 2024 · 0 comments

Comments

@dhiaayachi
Copy link
Owner

Description

This PR adds a new cli command to list exported services

command: consul services exported-services

The PR also adds the API docs for the exported services API.

CLI output
CE

$ ./bin/consul services exported-services                          
Service   Consumer Peers
backend   east, west
db        west
frontend  east, east-eu
web       east

Enterprise

$ ./bin/consul services exported-services                          
Service   Partition  Namespace  Consumer Peers  Consumer Partitions
backend   default    default    east, west      
db        default    default    west            partition-west
frontend  default    default    east, east-eu   
frontend  default    ns         east, east-eu   
web       default    default    east 

CLI output json

$ ./bin/consul services exported-services -format=json
[
    {
        "Service": "backend",
        "Consumers": {
            "Peers": [
                "east",
                "west"
            ]
        }
    },
    {
        "Service": "db",
        "Consumers": {
            "Peers": [
                "west"
            ]
        }
    },
    {
        "Service": "frontend",
        "Consumers": {
            "Peers": [
                "east",
                "east-eu"
            ]
        }
    },
    {
        "Service": "web",
        "Consumers": {
            "Peers": [
                "east"
            ]
        }
    }
]

Testing & Reproduction steps

  • Tests added
  • Manual testing

Links

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern
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

No branches or pull requests

1 participant