http

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIAMHandler

func NewIAMHandler(upstream http.Handler, containerStore docker.ContainerStore, credentialStore iam.CredentialStore, disableUpstream bool) fasthttp.RequestHandler

NewIAMHandler creates a http.Handler which responds to metadata API requests. When the request is for the IAM path, it looks up the IAM role in the container store and fetches those credentials. Otherwise, it acts as a reverse proxy for the real API.

Types

type CredentialResponse

type CredentialResponse struct {
	AccessKeyID     string `json:"AccessKeyId"`
	Code            string
	Expiration      time.Time
	LastUpdated     time.Time
	SecretAccessKey string
	Token           string
	Type            string
}

CredentialResponse is generated by the IAM handler.

Jump to

Keyboard shortcuts

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