You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
what does this function do exactly? Is it actually needed?
Yup it's needed. It associates a path with handler during startup depending on which subcommand is used to start AEMM. For example, if users use events subcommand, aemm events <args>, then IMDS paths (and handlers) involving spot should not be available-- that logic is handled in getHandlerPairs.
handlerPairs is saying each of these paths have a List Handler, which is a handler that lists available routes for a given path. userdata does NOT have a List Handler because userdata has no routes itself just the userdata value. Ex:
/latest needs to register a List Handler because hitting this path should list the following routes:
dynamic
meta-data
user-data
/latest/dynamic needs to register a List Handler because hitting this path should list the following routes:
fws/instance-monitoring
instance-identity/document
instance-identity/pkcs7
instance-identity/signature
/latest/user-data does not have a List Handler because hitting this path will return user-data value:
Does userdata need to be registered, in this function?
amazon-ec2-metadata-mock/pkg/cmd/cmdutil/cmdutil.go
Lines 102 to 109 in 0965dfc
It seems like things work without it, what does this function do exactly? Is it actually needed?
The text was updated successfully, but these errors were encountered: