server

package
v0.3.31 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSHeaderMiddleware

func AWSHeaderMiddleware(next http.HandlerFunc) http.HandlerFunc

func BaseHandler

func BaseHandler(w http.ResponseWriter, r *http.Request)

func BaseVersionHandler

func BaseVersionHandler(w http.ResponseWriter, r *http.Request)

func BrowserFilterMiddleware

func BrowserFilterMiddleware(next http.HandlerFunc) http.HandlerFunc

BrowserFilterMiddleware is a middleware designed mitigate risks related to DNS rebinding, cross site request forgery, and any other traffic from a well behaved modern web browser

func HealthcheckHandler

func HealthcheckHandler(w http.ResponseWriter, r *http.Request)

func IMDSHandler

func IMDSHandler(w http.ResponseWriter, r *http.Request)

func IamInfoHandler

func IamInfoHandler(w http.ResponseWriter, r *http.Request)

func InstanceIdentityDocumentHandler

func InstanceIdentityDocumentHandler(w http.ResponseWriter, r *http.Request)

func InstanceMetadataMiddleware

func InstanceMetadataMiddleware(next http.HandlerFunc) http.HandlerFunc

InstanceMetadataMiddleware is a convenience wrapper that chains TokenMiddleware, BrowserFilterMiddleware, and AWSHeaderMiddleware

func NotFoundHandler

func NotFoundHandler(w http.ResponseWriter, r *http.Request)

func RoleHandler

func RoleHandler(w http.ResponseWriter, r *http.Request)

func Run

func Run(host string, port int, role, region string, shutdown chan os.Signal) error

func TaskMetadataMiddleware

func TaskMetadataMiddleware(next http.HandlerFunc) http.HandlerFunc

TaskMetadataMiddleware is a convenience wrapper that chains BrowserFilterMiddleware and AWSHeaderMiddleware

func TokenHandler

func TokenHandler(w http.ResponseWriter, r *http.Request)

func TokenMiddleware

func TokenMiddleware(next http.HandlerFunc) http.HandlerFunc

Types

type ECSMetaDataCredentialResponse

type ECSMetaDataCredentialResponse struct {
	AccessKeyId     string
	SecretAccessKey string
	Token           string
	Expiration      string
	RoleArn         string
}

type MetaDataCredentialResponse

type MetaDataCredentialResponse struct {
	Code            string
	LastUpdated     string
	Type            string
	AccessKeyId     string
	SecretAccessKey string
	Token           string
	Expiration      string
}

type MetaDataIamInfoResponse

type MetaDataIamInfoResponse struct {
	Code               string `json:"Code"`
	LastUpdated        string `json:"LastUpdated"`
	InstanceProfileARN string `json:"InstanceProfileArn"`
	InstanceProfileID  string `json:"InstanceProfileId"`
}

type MetaDataInstanceIdentityDocumentResponse

type MetaDataInstanceIdentityDocumentResponse struct {
	DevpayProductCodes      []string `json:"devpayProductCodes"`
	MarkerplaceProductCodes []string `json:"marketplaceProductCodes"`
	PrivateIP               string   `json:"privateIp"`
	Version                 string   `json:"version"`
	InstanceID              string   `json:"instanceId"`
	BillingProductCodes     []string `json:"billingProducts"`
	InstanceType            string   `json:"instanceType"`
	AvailabilityZone        string   `json:"availabilityZone"`
	KernelID                string   `json:"kernelId"`
	RamdiskID               string   `json:"ramdiskId"`
	AccountID               string   `json:"accountId"`
	Architecture            string   `json:"architecture"`
	ImageID                 string   `json:"imageId"`
	PendingTime             string   `json:"pendingTime"`
	Region                  string   `json:"region"`
}

Jump to

Keyboard shortcuts

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