Skip to content
An Eureka client and subscriber for the KrakenD framework.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Krakend Eureka

An Eureka client and subscriber for the KrakenD framework.

Build the example

Go 1.8 is a requirement

$ make

Using Eureka client

	eurekaClient, err := eureka.New(ctx, serviceConfig.ExtraConfig)
	if err != nil {
		log.Fatal("ERROR:", err.Error())

	routerFactory := krakendgin.NewFactory(krakendgin.Config{
		Engine:         gin.Default(),
		Middlewares:    []gin.HandlerFunc{},
		Logger:         logger,
		HandlerFactory: krakendgin.EndpointHandler,
		ProxyFactory: customProxyFactory{
			proxy.DefaultFactoryWithSubscriber(logger, eureka.SubscriberFactory(ctx, eurekaClient)),

Registering your application in Eureka

eurekaClient.Register("krakend-gw", GetLocalIP(), serviceConfig.Port)


Running it as a common executable, logs are send to the stdOut and some options are available at the CLI

$ ./krakend_eureka_example
Usage of ./krakend_eureka_example:
  -c string
        Path to the configuration filename (default "/etc/krakend/configuration.json")
  -d	Enable the debug
  -l string
        Logging level (default "ERROR")
  -p int
        Port of the service
You can’t perform that action at this time.