etcd

command
v0.0.0-...-f040508 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 6 Imported by: 0

README

etcd

go连接etcd示例
# 下载Windows版etcd安装包,本例中下载的版本为etcd-v3.4.23-windows-amd64.zip
https://github.com/etcd-io/etcd/releases/
# 解压etcd压缩包到D:/soft/etcd
  • 转到D:/soft/etcd文件夹下,启动etcd服务
cd D:/soft/etcd
etcd.exe
  • 使用etcdctl.exe测试写入和读取
etcdctl.exe --help
etcdctl.exe put test hello
etcdctl.exe get test
# 更新test的命令也很简单,执行下面的命令即可
etcdctl.exe put test hi
etcdctl.exe endpoint status -w json | jq
  • 引入etcd的go依赖包
go mod init github.com/fastbpmn/go-study/etcd
go get go.etcd.io/etcd/client/v3

如果不习惯使用命令行,可以下载etcd的客户端https://github.com/gtamas/etcdmanager/releases

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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