dns

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 22

README

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.

Documentation

Overview

Package dns resolver

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDNSResolver

func NewDNSResolver() discovery.Resolver

NewDNSResolver create a dns based resolver

Types

This section is empty.

Jump to

Keyboard shortcuts

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