func AgentMetadataHandler(containerInstanceArn *string, cfg *config.Config) func(http.ResponseWriter, *http.Request) {
	return func(w http.ResponseWriter, r *http.Request) {
		resp := &MetadataResponse{
			Cluster:              cfg.Cluster,
			ContainerInstanceArn: containerInstanceArn,
			Version:              agentversion.String(),
		}
		responseJSON, _ := json.Marshal(resp)
		utils.WriteJSONToResponse(w, http.StatusOK, responseJSON, utils.RequestTypeAgentMetadata)
	}
}
func AgentMetadataHandler(containerInstanceArn *string, cfg *config.Config) func(http.ResponseWriter, *http.Request) {
	return func(w http.ResponseWriter, r *http.Request) {
		resp := &MetadataResponse{
			Cluster:              cfg.Cluster,
			ContainerInstanceArn: containerInstanceArn,
			Version:              agentversion.String(),
		}
		responseJSON, _ := json.Marshal(resp)
		utils.WriteJSONToResponse(w, http.StatusOK, responseJSON, utils.RequestTypeAgentMetadata)
	}
}
func AgentMetadataHandler ( containerInstanceArn * string , cfg * config . Config ) func ( http . ResponseWriter , * http . Request ) { return func ( w http . ResponseWriter , r * http . Request ) { resp := & MetadataResponse { Cluster : cfg . Cluster , ContainerInstanceArn : containerInstanceArn , Version : agentversion . String ( ) , } responseJSON , _ := json . Marshal ( resp ) utils . WriteJSONToResponse ( w , http . StatusOK , responseJSON , utils . RequestTypeAgentMetadata ) } }
// AgentMetadataHandler creates response for 'v1/metadata' API.
AgentMetadataHandler creates response for v1 / metadata API .