Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Add WCF support #43

Open
roh85 opened this issue Sep 17, 2016 · 2 comments
Open

Add WCF support #43

roh85 opened this issue Sep 17, 2016 · 2 comments

Comments

@roh85
Copy link

roh85 commented Sep 17, 2016

I like the idea of Microphone. In our enterprise we have a lot of WCF services. Therefore I am investigating if it is possible to add WCF support to Microphone.
I would appreciate it if you would be able to help me getting started by giving me some high level info how to best approach this.

@rogeralsing
Copy link
Owner

rogeralsing commented Sep 17, 2016

It would absolutely be possible.
We might end up using that support too at work as we do have a fair share of WCF there.

This would be the absolute bare minimum to get up and running

var loggerFactory = new LoggerFactory();
var logger = loggerFactory.CreateLogger("Cluster");
var options = new OptionsWrapper<ConsulOptions>(new ConsulOptions
{
    //configure consul here               
});
Cluster.RegisterService(new Uri("http://my.service"),new ConsulProvider(loggerFactory, options),"serviceName","1.0", logger);

You can call this from whatever start up code your service have, e.g. global asax or whatever.

@marcofranssen
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants