Skip to content

Use DNS as service discovery for Kitex. It is a common choice when your applications run on Kubernetes.

License

Notifications You must be signed in to change notification settings

kitex-contrib/resolver-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kitex DNS Resolver

Some application runtime use DNS as service discovery, e.g. Kubernetes.

How to use with Kitex client?

import (
    ...
    dns "github.com/kitex-contrib/resolver-dns"
    "github.com/cloudwego/kitex/client"
    ...
)

func main() {
    ...
    client, err := echo.NewClient("echo", client.WithResolver(dns.NewDNSResolver()))
	if err != nil {
		log.Fatal(err)
	}
    ...
}

Use Kitex client.WithResolver function optional, we can set DNS resolver with our client.

About

Use DNS as service discovery for Kitex. It is a common choice when your applications run on Kubernetes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages