digitalocean/go-metadata

Name: go-metadata

Owner: DigitalOcean

Description: Go client for the metadata API.

Created: 2015-09-17 15:30:08.0

Updated: 2018-03-13 08:46:44.0

Pushed: 2018-01-11 00:21:17.0

Homepage: null

Size: 14

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

metadata Documentation

A Go client to interact with the DigitalOcean Metadata API.

Usage

reate a client
nt := metadata.NewClient(opts)

equest all the metadata about the current droplet
 err := client.Metadata()
rr != nil {
log.Fatal(err)


ookup what our IPv4 address is on our first public
etwork interface.
icIPv4Addr := all.Interfaces["public"][0].IPv4.IPAddress

Println(publicIPv4Addr)

License

MIT license


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.