Skip to content

Commit

Permalink
Use kubeless runtime go1.14 with modules (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
sepetrov committed Aug 18, 2020
1 parent dbce09a commit 5d92e2e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
- docker
env:
global:
- KUBELESS_VERSION: v1.0.6
- KUBELESS_VERSION: v1.0.7
- KUBELESS_KAFKA_VERSION: v1.0.2
- MINIKUBE_VERSION: v0.25.2
- REPO_DOMAIN: serverless
Expand Down
2 changes: 1 addition & 1 deletion examples/post-go/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Simple Hello World function

This function returns the given data capitalizing the first word.
This function returns the given data.

```console
$ npm install
Expand Down
8 changes: 8 additions & 0 deletions examples/post-go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module kubeless

go 1.14

require (
github.com/kubeless/kubeless v1.0.7
github.com/sirupsen/logrus v1.6.0
)
7 changes: 3 additions & 4 deletions examples/post-go/handler.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package kubeless

import (
"fmt"

"github.com/sirupsen/logrus"
"github.com/kubeless/kubeless/pkg/functions"
)

// Handler sample function with data
// Handler returns the given data.
func Handler(event functions.Event, context functions.Context) (string, error) {
fmt.Println(event)
logrus.Println(event)
return event.Data, nil
}
2 changes: 1 addition & 1 deletion examples/post-go/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "Example function for serverless kubeless",
"dependencies": {
"serverless-kubeless": "^0.7.0"
"serverless-kubeless": "^0.10.1"
},
"devDependencies": {},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/post-go/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ service: go-echo

provider:
name: kubeless
runtime: go1.10
runtime: go1.14

plugins:
- serverless-kubeless
Expand Down

0 comments on commit 5d92e2e

Please sign in to comment.