Skip to content

Instantly share code, notes, and snippets.

View technosophos's full-sized avatar
💭
Rust

Matt Butcher technosophos

💭
Rust
View GitHub Profile
@technosophos
technosophos / gist:5258706
Last active December 15, 2015 12:09 — forked from AeroNotix/gist:5247096
One way of making it easy to construct new service instances, hide the implementation details, but separate the services. One big advantage in doing things this way is that you could pretty easily create tools to deal with multiple azs, regions, and geos. E.g. you could copy objects from USWest to USEast.
/* hpcloud */
import "hpcloud/objectstorage"
type Account struct {
// Stuff
}
func (a Account) ObjectStorage(region) {
/* Look up the endpoints and stuff...