Registry / networking / go-kratos-kratos-contrib-registry-consul-v2

go-kratos-kratos-contrib-registry-consul-v2

JSON →
library2.0.0-20260404020628-f149714c1d54gogounverified

Provides Consul-based service discovery and registration for the Kratos microservice framework.

go get github.com/go-kratos/kratos/contrib/registry/consul/v2
INSTALL
IMPORT
SIG · GO-KRATOS-KRATOS-C
G
go-kratos-kratos-contrib-registry-consul-v2
networkinggov2.0.0-20260404020628-f149714c1d54
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

consul
github.com/go-kratos/kratos/contrib/registry/consul/v2

Register a Kratos service with Consul

package main import ( "github.com/go-kratos/kratos/v2" "github.com/go-kratos/kratos/contrib/registry/consul/v2" consulapi "github.com/hashicorp/consul/api" ) func main() { consulClient, _ := consulapi.NewClient(consulapi.DefaultConfig()) reg := consul.New(consulClient) app := kratos.New( kratos.Name("helloworld"), kratos.Registrar(reg), ) app.Run() }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.0.0-20260404020628-f149714c1d54latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
go-kratos-kratos-contrib-registry-consul-v2 — go get go-kratos-kratos-contrib-registry-consul-v2 · libregistry