client

package
v0.0.0-...-c283e9f Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: BSD-3-Clause Imports: 8 Imported by: 8

Documentation

Overview

Package client provides a client for the router API.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("router: route not found")

ErrNotFound is returned when no route was found.

Functions

This section is empty.

Types

type Client

type Client interface {
	// StreamEvents streams router events with the given options
	StreamEvents(opts *router.StreamEventsOptions, output chan *router.StreamEvent) (stream.Stream, error)
}

Client is a client for the router API.

func New

func New() Client

New uses the default discoverd client and returns a client.

func NewWithAddr

func NewWithAddr(addr string) Client

NewWithAddr uses addr as the specified API url and returns a client.

func NewWithHTTP

func NewWithHTTP(http *http.Client) Client

NewWithHTTP does the same thing as New but uses the given *http.Client

Jump to

Keyboard shortcuts

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