npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eureka-synchronizer

v2.0.0

Published

Synchronize service available on a distant eureka with the local eureka by creating http proxies to distant services

Downloads

9

Readme

Eureka Proxy

Declare in local eureka all services of another eureka with http proxies to each service.

Usage

Installing

npm install -g eureka-synchronizer

Start

eureka-synchronizer --help
Synchronize service available on a distant eureka or kubernetes with the local eureka by creating http proxies to distant services

USAGE
  $ nestjs-console-oclif TARGET

ARGUMENTS
  TARGET  Must be the eureka url or in kubernetes mode the namespace where search services

OPTIONS
  -f, --filter=filter              Allow to filter, with a regexp, the distant services to bind.
  -h, --help                       show CLI help
  -i, --interval=interval          [default: 60] The interval to refresh proxies in seconds.
  -k, --kubernetes                 Enable kubernetes mode. Search services in kubernetes cluster and inject them in eureka.
  -p, --port=port                  [default: 9000] The first port to bind proxies.
  -s, --subDomain=subDomain        Add a sub-domain to each host in eureka. May be useful by the proxy to resolve distant services.
  -x, --proxy=proxy                The proxy to use to contact the eureka.
  --replaceHost=replaceHost        [default: ] Replace value in each host in eureka. It use the sed pattern : /value to replace/final value/
  --replaceService=replaceService  [default: ] Replace value in service name. It use the sed pattern : /value to replace/final value/

EXAMPLES
  $ eureka-synchronizer --help
  $ eureka-synchronizer http://my-distant.eureka.com/eureka/apps
  $ eureka-synchronizer --kubernetes myNamespace
  $ eureka-synchronizer http://my-distant.eureka.com/eureka/apps --replaceHost /.svc/.priv.myCompagny.com/
  $ eureka-synchronizer --kubernetes default --replaceService /-service// --replaceService /-node/-module/

Kubernetes

eureka-synchronizer works with kubernetes and imports kubernetes services into your local eureka.

It use kubectl command. Check that your kubectl is configured by running : kubectl cluster-info

If the command does not work, follow kubernetes documentation

eureka-synchronizer will find services in a namespace of the kubernetes cluster. If you want inject services of the default namesapce, run the comamnd : eureka-synchronizer --kubernetes default

:warning: You need to have the RBAC permissions to make requests to services via kubectl proxy

Example

Example with a proxy

eureka-synchronizer --proxy http://proxy.corporate.com:3128 http://eureka.dev.net/eureka/apps

Example with interval, port and filter (name which start with CORP_SERV_)

eureka-synchronizer -i 30 -p 9000 -f "^CORP_SERV_" http://eureka.dev.net/eureka/apps

Example with kubernetes cluster and mapping of service names

eureka-synchronizer --kubernetes default --replaceService /-service// --replaceService /-node/-module/

This command will search services defined in the namespace default and map the services name by removing -service string and replace in the services name -node by -module.