Sha256: 9c6f85f6b3ba6fb3568ce3d2aeb497ddebda25826df42bd402cc3b3973395737
Contents?: true
Size: 744 Bytes
Versions: 16
Compression:
Stored size: 744 Bytes
Contents
package middleware import ( "github.com/aws/smithy-go/middleware" ) // requestIDKey is used to retrieve request id from response metadata type requestIDKey struct{} // SetRequestIDMetadata sets the provided request id over middleware metadata func SetRequestIDMetadata(metadata *middleware.Metadata, id string) { metadata.Set(requestIDKey{}, id) } // GetRequestIDMetadata retrieves the request id from middleware metadata // returns string and bool indicating value of request id, whether request id was set. func GetRequestIDMetadata(metadata middleware.Metadata) (string, bool) { if !metadata.Has(requestIDKey{}) { return "", false } v, ok := metadata.Get(requestIDKey{}).(string) if !ok { return "", true } return v, true }
Version data entries
16 entries across 16 versions & 1 rubygems