statehub-cloud

module
Version: v0.2.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2021 License: Apache-2.0

README

Statehub Cloud - go cloud agnostic package

Metadata service

import "gitlab.com/statehub/statehub-cloud/pkg/cloud"
cloud, err := cloud.GetCloud()
metadata, err := cloud.GetMetadata()
region := metadata.Region

Endpoint creation

import (
	"gitlab.com/statehub/statehub-cloud/pkg/cloud"
	"gitlab.com/statehub/statehub-cloud/pkg/types"
)

cloud, err := cloud.GetCloud()
endpointID, err := cloud.CreateEndpoint(&types.CreateEndpointRequest{
    StateID:    "87324fhb3-f4378f1h8-f34hg78",
    StateName:  "statesarecool",
    DryRun:     false,
    Vnet:       "vpc-xxxxxxxxxxx",
    Subnet:     "subnet-xxxxxxxxxxxx",
    ServiceURI: "com.example.serviceone",
})

Directories

Path Synopsis
pkg
aws

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL