Skip to content

Conversation

alexellis
Copy link
Member

@alexellis alexellis commented Jul 23, 2020

Signed-off-by: Alex Ellis (OpenFaaS Ltd) alexellis2@gmail.com

Description

Move to using templates-sdk repo for http function

The HTTP function now makes use of a dedicated repository
for SDK resources in the openfaas org.

How Has This Been Tested?

e2e testing with a newly created function on my kind cluster, then I changed the code and ran faas up to see the change reflect.

package function

import (
	"fmt"
	"net/http"

	handler "github.com/openfaas/templates-sdk/go-http"
)

// Handle a function invocation
func Handle(req handler.Request) (handler.Response, error) {
	var err error

	message := fmt.Sprintf("hallo alex, input was: %s", string(req.Body))

	return handler.Response{
		Body:       []byte(message),
		StatusCode: http.StatusOK,
	}, err
}

How are existing users impacted? What migration steps/scripts do we need?

I don't believe that they are affected, the previous repo still exists that held the go function SDK, but is archived.

The HTTP function now makes use of a dedicated repository
for SDK resources in the openfaas org.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
@alexellis alexellis merged commit 158d288 into master Jul 23, 2020
@alexellis alexellis deleted the templates-sdk branch July 23, 2020 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant