dns

package module
Version: v0.0.0-...-24a9ae4 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL