Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

trpc.group/trpc-go/trpc-gateway/core/loader/etcd

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trpc.group/trpc-go/trpc-gateway/core/loader/etcd

Go Modules
Version
v1.0.0
Version published
Created
Source

Router configuration etcd loader

Usage:

  • Create a key named "router_conf" in etcd to manage the router configuration.
  • Import the etcd loader anonymously in the main.go file of the project.
import    _ "trpc.group/trpc-go/trpc-gateway/core/loader/etcd"
  • Specify the etcd loader in the trpc_go.yaml framework configuration and configure the etcd address.
global: # Global configuration
  conf_provider: etcd        # Specify the etcd loader
server:
  app: ${app}                                               # Application name
  server: ${server}                                         # Process server name
  service: # Services provided by the business
    - name: trpc.${app}.${server}.gateway    # Service route name, replace ReplaceMe with your own service name, do not change app and server placeholders
plugins:
  # Configure etcd information, refer to: https://git.woa.com/trpc-go/trpc-config-etcd
  config:
    etcd:
      endpoints: ["http://127.0.0.1:2380"]
  • Configuration example:etcd loader example

FAQs

Package last updated on 18 Jan 2024

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