middleware

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 12 Imported by: 82

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAttemptClockSkewMiddleware

func AddAttemptClockSkewMiddleware(stack *middleware.Stack)

AddAttemptClockSkewMiddleware adds AttemptClockSkewMiddleware to the middleware stack

func AddRequestIDRetrieverMiddleware

func AddRequestIDRetrieverMiddleware(stack *middleware.Stack)

AddRequestIDRetrieverMiddleware adds request id retriever middleware

func AddRequestInvocationIDMiddleware

func AddRequestInvocationIDMiddleware(stack *middleware.Stack)

AddRequestInvocationIDMiddleware adds RequestInvocationIDMiddleware to the middleware stack

func AddUserAgentKey

func AddUserAgentKey(key string) func(*middleware.Stack) error

AddUserAgentKey retrieves a requestUserAgent from the provided stack, or initializes one.

func AddUserAgentKeyValue

func AddUserAgentKeyValue(key, value string) func(*middleware.Stack) error

AddUserAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one.

func GetOperationName

func GetOperationName(ctx context.Context) (v string)

GetOperationName retrieves the service operation metadata from the context.

func GetRegion

func GetRegion(ctx context.Context) (v string)

GetRegion retrieves the endpoint region from the context.

func GetRequestIDMetadata

func GetRequestIDMetadata(metadata middleware.Metadata) (string, bool)

GetRequestIDMetadata retrieves the request id from middleware metadata returns string and bool indicating value of request id, whether request id was set.

func GetServiceID

func GetServiceID(ctx context.Context) (v string)

GetServiceID retrieves the service id from the context.

func GetSigningName

func GetSigningName(ctx context.Context) (v string)

GetSigningName retrieves the service signing name from the context.

func GetSigningRegion

func GetSigningRegion(ctx context.Context) (v string)

GetSigningRegion retrieves the region from the context.

func SetRequestIDMetadata

func SetRequestIDMetadata(metadata *middleware.Metadata, id string)

SetRequestIDMetadata sets the provided request id over middleware metadata

func SetSigningName

func SetSigningName(ctx context.Context, value string) context.Context

SetSigningName set or modifies the signing name on the context.

func SetSigningRegion

func SetSigningRegion(ctx context.Context, value string) context.Context

SetSigningRegion sets or modifies the region on the context.

Types

type AttemptClockSkewMiddleware

type AttemptClockSkewMiddleware struct{}

AttemptClockSkewMiddleware calculates the clock skew of the SDK client TODO: Could be a better name, since this calculates more then skew

func (AttemptClockSkewMiddleware) HandleDeserialize

HandleDeserialize calculates response metadata and clock skew

func (AttemptClockSkewMiddleware) ID

ID is the middleware identifier

type RegisterServiceMetadata

type RegisterServiceMetadata struct {
	ServiceID     string
	SigningName   string
	Region        string
	OperationName string
}

RegisterServiceMetadata registers metadata about the service and operation into the middleware context so that it is available at runtime for other middleware to introspect.

func (RegisterServiceMetadata) HandleInitialize

HandleInitialize registers service metadata information into the middleware context, allowing for introspection.

func (RegisterServiceMetadata) ID

ID returns the middleware identifier.

type RequestInvocationIDMiddleware

type RequestInvocationIDMiddleware struct{}

RequestInvocationIDMiddleware is a Smithy BuildMiddleware that will generate a unique ID for logical API operation invocation.

func (RequestInvocationIDMiddleware) HandleBuild

HandleBuild attaches a unique operation invocation id for the operation to the request

func (RequestInvocationIDMiddleware) ID

ID the identifier for the RequestInvocationIDMiddleware

type ResponseMetadata

type ResponseMetadata struct {
	ResponseAt  time.Time
	ServerTime  time.Time
	AttemptSkew time.Duration
}

ResponseMetadata is metadata about the transport layer response

func GetResponseMetadata

func GetResponseMetadata(metadata middleware.Metadata) (v ResponseMetadata)

GetResponseMetadata retrieves response metadata from the context, if nil returns an empty value

Jump to

Keyboard shortcuts

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