Pebl Release 0.0.4!

Pebl Release 0.0.4!

release 0.0.4 includes support internal services

·

2 min read

Quick Summary

Previously all pebl services were external facing. But a very common way of organizing distributed systems is by creating internal (micro)services that handle a localized part of the whole system.

With release 0.0.4, we introduce a new SDK binding that supports internal only services.

Longform

The previous service binding remains unchanged. Using it will create a service that is exposed to external traffic.

Release 0.0.4 introduces the new internal_service binding. Unlike the external counterpart, this method will create a service that's only reachable from other running workloads.

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("some internal service!\n"))
    })

    sdk.InternalService(service, "svc.internal")
}

Note that the endpoint parameter here can be anything as long as it is in a valid domain format. We recommend creating an internally consistent scheme by adopting a TLD for all internal services, such as .internal or .local.

Upgrading

Make sure to download the latest pebl CLI, which will be needed in order to utilize the new release on your local cluster. Follow the section about installing the CLI in the setup guide.

Go

The Go SDK is available with the 0.0.4 tag. You can update your Go projects by running go get github.com/peblcloud/go@v0.0.4.

Python

The Python SDK is available as pre-built docker images. Update your Python projects by changing the Dockerfile to utilize one of the 0.0.4 images.