statehub-cloud

module
v0.2.22 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 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