2014-03-18 09:00:41 -07:00
|
|
|
package datasource
|
2014-03-04 16:36:05 -08:00
|
|
|
|
|
|
|
type metadataService struct {
|
2014-04-22 15:36:07 -07:00
|
|
|
url string
|
2014-03-04 16:36:05 -08:00
|
|
|
}
|
|
|
|
|
2014-03-04 17:06:52 -08:00
|
|
|
func NewMetadataService(url string) *metadataService {
|
2014-04-22 15:36:07 -07:00
|
|
|
return &metadataService{url}
|
2014-03-04 16:36:05 -08:00
|
|
|
}
|
|
|
|
|
2014-03-18 09:00:41 -07:00
|
|
|
func (ms *metadataService) Fetch() ([]byte, error) {
|
2014-04-22 15:36:07 -07:00
|
|
|
return fetchURL(ms.url)
|
2014-03-04 16:36:05 -08:00
|
|
|
}
|
|
|
|
|
2014-03-18 09:00:41 -07:00
|
|
|
func (ms *metadataService) Type() string {
|
|
|
|
return "metadata-service"
|
|
|
|
}
|