registry

package
v0.0.0-...-eb68438 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = &Config{
	Endpoints:   []string{"localhost:2379"},
	DialTimeout: 5 * time.Second,
}

DefaultConfig 提供默认配置

Functions

func PutEtcdConHashNodeCount

func PutEtcdConHashNodeCount(cli *clientv3.Client, addr string, count int64) error

func Register

func Register(svcName, addr string, stopCh <-chan struct{}) error

Register 注册服务到etcd

Types

type Config

type Config struct {
	Endpoints   []string      // 集群地址
	DialTimeout time.Duration // 连接超时时间
}

Config 定义etcd客户端配置

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL