Go SDK!

Go SDK!

Release 0.0.3 includes support for Go

·

2 min read

Release 0.0.3 now includes support for Go!

Quick Summary

Pebl now supports projects in Go! Update to the latest CLI and follow this guide to get started.

Longform

At pebl we often talk about creating a full abstraction layer for the cloud. And at the core of this idea is that we can provide the full set of cloud capabilities through a programmatic binding, allowing developers to encode their infrastructure as code. An important mark of whether this is feasible is by expanding the set of languages that we support.

So we are very excited to release pebl's Go SDK, meaning that you can now incorporate pebl's cloud capabilities into your Go projects!

Short Example

The Go SDK is available as a public package.

Simply run go get github.com/peblcloud/go and incorporate in your app:

package main

import (
    "net/http"
    "github.com/peblcloud/go/sdk"
)

func main() {
    service := http.NewServeMux()

    service.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
        w.Write([]byte("hello, world!\n"))
    })

    sdk.Service(service, "hey.pebl.rocks")
}

To run, use the familiar pebl run cli command at the root of the project. Note that unlike Python projects, Go projects do not require a Dockerfile!

For a more detailed tutorial of using pebl's Go SDK, check out our guided example.

Python

A short note on the Python SDK, we have expanded the set of base images available for your use! Now you can combine the desired pebl SDK version (latest is 0.0.3) with the desired Python version (3.10, 3.11, 3.12). You can find more information on our peblcloud dockerhub.