client

package
v0.11.3 Latest Latest
Warning

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

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

Documentation

Overview

Package client implements a ResourceDiscovery service (RDS) client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents an RDS based client instance.

func New

func New(c *configpb.ClientConf, listResources ListResourcesFunc, l *logger.Logger) (*Client, error)

New creates an RDS (ResourceDiscovery service) client instance and set it up for continuous refresh.

func (*Client) ListEndpoints

func (client *Client) ListEndpoints() []endpoint.Endpoint

ListEndpoints returns the list of resources.

func (*Client) Resolve

func (client *Client) Resolve(name string, ipVer int) (net.IP, error)

Resolve returns the IP address for the given resource. If no IP address is associated with the resource, an error is returned.

type ListResourcesFunc

type ListResourcesFunc func(context.Context, *pb.ListResourcesRequest) (*pb.ListResourcesResponse, error)

ListResourcesFunc is a function that takes ListResourcesRequest and returns ListResourcesResponse.

Directories

Path Synopsis
This binary implements a standalone ResourceDiscovery service (RDS) client.
This binary implements a standalone ResourceDiscovery service (RDS) client.

Jump to

Keyboard shortcuts

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