http

package
v0.0.0-...-b44b43e Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2017 License: Unlicense Imports: 13 Imported by: 0

Documentation

Overview

Package http provides an HTTP client for the Ambition service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(instance string, options ...ClientOption) (pb.AmbitionServer, error)

New returns a service backed by an HTTP server living at the remote instance. We expect instance to come from a service discovery system, so likely of the form "host:port".

Types

type ClientOption

type ClientOption func(*clientConfig) error

ClientOption is a function that modifies the client config

func CtxValuesToSend

func CtxValuesToSend(keys ...string) ClientOption

CtxValuesToSend configures the http client to pull the specified keys out of the context and add them to the http request as headers. Note that keys will have net/http.CanonicalHeaderKey called on them before being send over the wire and that is the form they will be available in the server context.

Jump to

Keyboard shortcuts

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