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

Example for etcd for service discovery ? #35

Open
iangregsondev opened this issue Aug 22, 2020 · 1 comment
Open

Example for etcd for service discovery ? #35

iangregsondev opened this issue Aug 22, 2020 · 1 comment

Comments

@iangregsondev
Copy link

Hi,

I would like to see an example of a service discovery using etcd.

I checked some samples but I don't fully understand it.

How do you register a service using etcd ?

How do you get the IP etc that was registered from another service ?

Any other examples that I have missed ?

Also any specific english documentation ?

Thanks in advance

@iangregsondev
Copy link
Author

Looking into the service / packages - I see the following methods.

Can you tell me what they are for ?

I was hoping to get a "getServiceName" and passing in the name ?

I think I am just missing a concrete example and what the following methods do.

    public getServiceNames(): string[] 

    public getServiceServers(service: string, passing?: boolean): IServiceServer[]

    public getServices(): { [p: string]: IServiceServer[] } 

    public watch(service: string, callback: (services: IServiceServer[]) => void): void 

    public watchServiceList(callback: (service: string[]) => void): void 

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