Merge pull request #161 from jonboulle/doc

metadata: add links to metadata source information
This commit is contained in:
Jonathan Boulle 2014-06-25 08:55:26 -07:00
commit e1222c9885

View File

@ -9,6 +9,13 @@ import (
"github.com/coreos/coreos-cloudinit/pkg" "github.com/coreos/coreos-cloudinit/pkg"
) )
// metadataService retrieves metadata from either an OpenStack[1] or EC2[2] compatible endpoint.
// It will first attempt to directly retrieve a JSON blob from the OpenStack endpoint. If that
// fails with a 404, it then attempts to retrieve metadata bit-by-bit from the EC2 endpoint,
// and populates that into an equivalent JSON blob.
//
// [1] http://docs.openstack.org/grizzly/openstack-compute/admin/content/metadata-service.html
// [2] http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html#instancedata-data-categories
type metadataService struct { type metadataService struct {
url string url string
} }