handler

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package handler is the handler for the `micro network dns` command

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNS

type DNS struct {
	// contains filtered or unexported fields
}

DNS handles incoming gRPC requests

func New

func New(provider provider.Provider, token string) *DNS

New returns a new handler

func (*DNS) Advertise

func (d *DNS) Advertise(ctx context.Context, req *dns.AdvertiseRequest, rsp *dns.AdvertiseResponse) error

Advertise adds records of network nodes to DNS

func (*DNS) Remove

func (d *DNS) Remove(ctx context.Context, req *dns.RemoveRequest, rsp *dns.RemoveResponse) error

Remove removes itself from DNS

func (*DNS) Resolve

func (d *DNS) Resolve(ctx context.Context, req *dns.ResolveRequest, rsp *dns.ResolveResponse) error

Resolve looks up matching records and returns any matches

Jump to

Keyboard shortcuts

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