Host Factor Provider SDK - Go
A golang SDK for creating blueprint providers for Host Factor.
Getting started
Make sure to download the latest go distro.
Installation
go get -d github.com/hostfactor/provider-sdk-go
Usage
package main
import (
"github.com/hostfactor/api/go/blueprint"
"github.com/hostfactor/provider-sdk-go/provider"
)
type Provider struct {
}
func (p *Provider) GenerateBlueprint(data *blueprint.BlueprintData) (*blueprint.Blueprint, error) {
//TODO implement me
panic("implement me")
}
func main() {
provider.Run(new(Provider))
}
The above will create a generic Provider
that is able to receive requests to create Host Factor servers. When a user is attempting to create an instance of your blueprint
, your provider will receive a request in the form of blueprint.BlueprintData
.