Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/asim/go-micro/plugins/selector/static/v3

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/asim/go-micro/plugins/selector/static/v3

  • v3.7.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Static selector

The Static selector returns the named service as a node for every request. This is useful where you want to offload discovery and balancing to DNS (particularly useful with KubeDNS).

This DOES however require a static port assignment (because we no longer have the ability to look up metadata). This defaults to port 8080, but can be overriddden at runtime using env-vars.

An optional domain-name can be appended too.

Environment variables

  • "STATIC_SELECTOR_DOMAIN_NAME": An optional domain-name to append to the speicified service name.
  • "STATIC_SELECTOR_PORT_NUMBER": Override the default port (8080) for "discovered" services.

Usage

selector := static.NewSelector()

service := micro.NewService(
	client.NewClient(client.Selector(selector))
)

FAQs

Package last updated on 11 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc