mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Mass s&r: iron-io -> kumokit
This commit is contained in:
128
CHANGELOG.md
128
CHANGELOG.md
@@ -4,73 +4,73 @@
|
|||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- [#428](https://github.com/iron-io/functions/issues/428): Change update route from PUT to PATCH.
|
- [#428](https://github.com/kumokit/functions/issues/428): Change update route from PUT to PATCH.
|
||||||
- [#368](https://github.com/iron-io/functions/issues/368): fn: support route headers tweaks.
|
- [#368](https://github.com/kumokit/functions/issues/368): fn: support route headers tweaks.
|
||||||
- [#316](https://github.com/iron-io/functions/issues/316): fnctl: Add rustlang support.
|
- [#316](https://github.com/kumokit/functions/issues/316): fnctl: Add rustlang support.
|
||||||
- [#313](https://github.com/iron-io/functions/issues/313): fnctl: Add .NET core support?.
|
- [#313](https://github.com/kumokit/functions/issues/313): fnctl: Add .NET core support?.
|
||||||
- [#310](https://github.com/iron-io/functions/issues/310): fnctl: Add python support.
|
- [#310](https://github.com/kumokit/functions/issues/310): fnctl: Add python support.
|
||||||
- [#69](https://github.com/iron-io/functions/issues/69): Long(er) running containers for better performance aka Hot Containers.
|
- [#69](https://github.com/kumokit/functions/issues/69): Long(er) running containers for better performance aka Hot Containers.
|
||||||
- [#472](https://github.com/iron-io/functions/pull/472): Add global lru for routes with keys being the appname + path.
|
- [#472](https://github.com/kumokit/functions/pull/472): Add global lru for routes with keys being the appname + path.
|
||||||
- [#484](https://github.com/iron-io/functions/pull/484): Add triggers example for OpenStack project Picasso.
|
- [#484](https://github.com/kumokit/functions/pull/484): Add triggers example for OpenStack project Picasso.
|
||||||
- [#487](https://github.com/iron-io/functions/pull/487): Add initial load balancer.
|
- [#487](https://github.com/kumokit/functions/pull/487): Add initial load balancer.
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
- [#483](https://github.com/iron-io/functions/pull/483): Listen for PORT before running async/sync workers in order to prevent errors.
|
- [#483](https://github.com/kumokit/functions/pull/483): Listen for PORT before running async/sync workers in order to prevent errors.
|
||||||
- [#479](https://github.com/iron-io/functions/pull/478): Add routes config set/unset back
|
- [#479](https://github.com/kumokit/functions/pull/478): Add routes config set/unset back
|
||||||
- [#429](https://github.com/iron-io/functions/issues/429): Broken docs after merge.
|
- [#429](https://github.com/kumokit/functions/issues/429): Broken docs after merge.
|
||||||
- [#422](https://github.com/iron-io/functions/issues/422): The headers field in func.yaml expects an array of values for each header key.
|
- [#422](https://github.com/kumokit/functions/issues/422): The headers field in func.yaml expects an array of values for each header key.
|
||||||
- [#421](https://github.com/iron-io/functions/issues/421): Can't update a route and show better error message.
|
- [#421](https://github.com/kumokit/functions/issues/421): Can't update a route and show better error message.
|
||||||
- [#420](https://github.com/iron-io/functions/issues/420): `fn` tool install script not being updated to new releases.
|
- [#420](https://github.com/kumokit/functions/issues/420): `fn` tool install script not being updated to new releases.
|
||||||
- [#419](https://github.com/iron-io/functions/issues/419): --runtime flag on init doesn't work area/fn .
|
- [#419](https://github.com/kumokit/functions/issues/419): --runtime flag on init doesn't work area/fn .
|
||||||
- [#414](https://github.com/iron-io/functions/issues/414): make run-docker is buggy on linux .
|
- [#414](https://github.com/kumokit/functions/issues/414): make run-docker is buggy on linux .
|
||||||
- [#413](https://github.com/iron-io/functions/issues/413): fnctl: Creating routes ignores the route path and assigns function name.
|
- [#413](https://github.com/kumokit/functions/issues/413): fnctl: Creating routes ignores the route path and assigns function name.
|
||||||
- [#403](https://github.com/iron-io/functions/issues/403): Route update (HTTP PUT) modifies datastore entity by making it inconsistent.
|
- [#403](https://github.com/kumokit/functions/issues/403): Route update (HTTP PUT) modifies datastore entity by making it inconsistent.
|
||||||
- [#393](https://github.com/iron-io/functions/issues/393): Add documentation on how to use hot containers.
|
- [#393](https://github.com/kumokit/functions/issues/393): Add documentation on how to use hot containers.
|
||||||
- [#384](https://github.com/iron-io/functions/issues/384): Multiple routines use non-threadsafe cache.
|
- [#384](https://github.com/kumokit/functions/issues/384): Multiple routines use non-threadsafe cache.
|
||||||
- [#381](https://github.com/iron-io/functions/issues/381): Unable to update route path through HTTP PUT area/api bug.
|
- [#381](https://github.com/kumokit/functions/issues/381): Unable to update route path through HTTP PUT area/api bug.
|
||||||
- [#380](https://github.com/iron-io/functions/issues/380): Unable to update app name.
|
- [#380](https://github.com/kumokit/functions/issues/380): Unable to update app name.
|
||||||
- [#373](https://github.com/iron-io/functions/issues/373): fn build should fail if no version in func.yaml.
|
- [#373](https://github.com/kumokit/functions/issues/373): fn build should fail if no version in func.yaml.
|
||||||
- [#369](https://github.com/iron-io/functions/issues/369): Add documentation related to SpecialHandlers.
|
- [#369](https://github.com/kumokit/functions/issues/369): Add documentation related to SpecialHandlers.
|
||||||
- [#366](https://github.com/iron-io/functions/issues/366): Documentation lagging behind after Hot Containers.
|
- [#366](https://github.com/kumokit/functions/issues/366): Documentation lagging behind after Hot Containers.
|
||||||
- [#365](https://github.com/iron-io/functions/issues/365): Documentation lagging behind on AppListeners.
|
- [#365](https://github.com/kumokit/functions/issues/365): Documentation lagging behind on AppListeners.
|
||||||
- [#364](https://github.com/iron-io/functions/issues/364): Remove app_name from per function endpoints.
|
- [#364](https://github.com/kumokit/functions/issues/364): Remove app_name from per function endpoints.
|
||||||
- [#363](https://github.com/iron-io/functions/issues/363): Update CONTRIBUTING with some rules of PRs.
|
- [#363](https://github.com/kumokit/functions/issues/363): Update CONTRIBUTING with some rules of PRs.
|
||||||
- [#360](https://github.com/iron-io/functions/issues/360): HTTP route /version is not described in swagger doc.
|
- [#360](https://github.com/kumokit/functions/issues/360): HTTP route /version is not described in swagger doc.
|
||||||
- [#352](https://github.com/iron-io/functions/issues/352): Improve `fn publish` command .
|
- [#352](https://github.com/kumokit/functions/issues/352): Improve `fn publish` command .
|
||||||
- [#345](https://github.com/iron-io/functions/issues/345): Check and fix for potential goroutine leak in api/runner.
|
- [#345](https://github.com/kumokit/functions/issues/345): Check and fix for potential goroutine leak in api/runner.
|
||||||
- [#339](https://github.com/iron-io/functions/issues/339): Unable to run sync route execution longer than 60 seconds.
|
- [#339](https://github.com/kumokit/functions/issues/339): Unable to run sync route execution longer than 60 seconds.
|
||||||
- [#320](https://github.com/iron-io/functions/issues/320): Change cli tool name to `fn`?.
|
- [#320](https://github.com/kumokit/functions/issues/320): Change cli tool name to `fn`?.
|
||||||
- [#319](https://github.com/iron-io/functions/issues/319): Update docs to link to client libraries.
|
- [#319](https://github.com/kumokit/functions/issues/319): Update docs to link to client libraries.
|
||||||
- [#304](https://github.com/iron-io/functions/issues/304): Create an fnctl dns entry and enable ssl for install of the cli tool.
|
- [#304](https://github.com/kumokit/functions/issues/304): Create an fnctl dns entry and enable ssl for install of the cli tool.
|
||||||
- [#302](https://github.com/iron-io/functions/issues/302): Placement of app name in fnctl seems inconsistent .
|
- [#302](https://github.com/kumokit/functions/issues/302): Placement of app name in fnctl seems inconsistent .
|
||||||
- [#301](https://github.com/iron-io/functions/issues/301): can add a route with /hello but can’t delete it with /hello .. have to delete it with just hello.
|
- [#301](https://github.com/kumokit/functions/issues/301): can add a route with /hello but can’t delete it with /hello .. have to delete it with just hello.
|
||||||
- [#299](https://github.com/iron-io/functions/issues/299): More obvious USAGE line for where to include app name.
|
- [#299](https://github.com/kumokit/functions/issues/299): More obvious USAGE line for where to include app name.
|
||||||
- [#298](https://github.com/iron-io/functions/issues/298): deleting a route that doesn't exist says it's deleted.
|
- [#298](https://github.com/kumokit/functions/issues/298): deleting a route that doesn't exist says it's deleted.
|
||||||
- [#296](https://github.com/iron-io/functions/issues/296): Better error messages for error on creating app.
|
- [#296](https://github.com/kumokit/functions/issues/296): Better error messages for error on creating app.
|
||||||
- [#293](https://github.com/iron-io/functions/issues/293): fn: auto release for fn.
|
- [#293](https://github.com/kumokit/functions/issues/293): fn: auto release for fn.
|
||||||
- [#288](https://github.com/iron-io/functions/issues/288): api: add upsert entrypoint for route updates.
|
- [#288](https://github.com/kumokit/functions/issues/288): api: add upsert entrypoint for route updates.
|
||||||
- [#284](https://github.com/iron-io/functions/issues/284): Update iron/node image.
|
- [#284](https://github.com/kumokit/functions/issues/284): Update iron/node image.
|
||||||
- [#275](https://github.com/iron-io/functions/issues/275): Functions API /tasks returns only one task ignoring query parameter `n`.
|
- [#275](https://github.com/kumokit/functions/issues/275): Functions API /tasks returns only one task ignoring query parameter `n`.
|
||||||
- [#274](https://github.com/iron-io/functions/issues/274): Support app deletion API .
|
- [#274](https://github.com/kumokit/functions/issues/274): Support app deletion API .
|
||||||
- [#254](https://github.com/iron-io/functions/issues/254): HTTP POST to /apps/{app}/routes is not returning HTTP 409 in case of existing similar route.
|
- [#254](https://github.com/kumokit/functions/issues/254): HTTP POST to /apps/{app}/routes is not returning HTTP 409 in case of existing similar route.
|
||||||
- [#253](https://github.com/iron-io/functions/issues/253): HTTP POST to /app for app creation should return HTTP 409 if app already exists.
|
- [#253](https://github.com/kumokit/functions/issues/253): HTTP POST to /app for app creation should return HTTP 409 if app already exists.
|
||||||
- [#252](https://github.com/iron-io/functions/issues/252): HTTP PUT to /apps/{app} creates new app instead of modifying initial.
|
- [#252](https://github.com/kumokit/functions/issues/252): HTTP PUT to /apps/{app} creates new app instead of modifying initial.
|
||||||
- [#251](https://github.com/iron-io/functions/issues/251): Maybe drop the CONFIG_ prefix on user defined config vars?.
|
- [#251](https://github.com/kumokit/functions/issues/251): Maybe drop the CONFIG_ prefix on user defined config vars?.
|
||||||
- [#235](https://github.com/iron-io/functions/issues/235): Docs: Missing Redis docs.
|
- [#235](https://github.com/kumokit/functions/issues/235): Docs: Missing Redis docs.
|
||||||
- [#229](https://github.com/iron-io/functions/issues/229): fnctl change suggestions.
|
- [#229](https://github.com/kumokit/functions/issues/229): fnctl change suggestions.
|
||||||
- [#218](https://github.com/iron-io/functions/issues/218): Copy s3 event example from iron-io/lambda.
|
- [#218](https://github.com/kumokit/functions/issues/218): Copy s3 event example from kumokit/lambda.
|
||||||
- [#216](https://github.com/iron-io/functions/issues/216): fnclt lambda commands need to automatically detect region from the AWS config.
|
- [#216](https://github.com/kumokit/functions/issues/216): fnclt lambda commands need to automatically detect region from the AWS config.
|
||||||
- [#197](https://github.com/iron-io/functions/issues/197): Create an fnctl dns entry and enable ssl for install of the cli tool.
|
- [#197](https://github.com/kumokit/functions/issues/197): Create an fnctl dns entry and enable ssl for install of the cli tool.
|
||||||
- [#182](https://github.com/iron-io/functions/issues/182): Remove error in logs when image not found.
|
- [#182](https://github.com/kumokit/functions/issues/182): Remove error in logs when image not found.
|
||||||
- [#161](https://github.com/iron-io/functions/issues/161): Example slackbot - Copy guppy example over.
|
- [#161](https://github.com/kumokit/functions/issues/161): Example slackbot - Copy guppy example over.
|
||||||
- [#134](https://github.com/iron-io/functions/issues/134): Dynamic runners scaling.
|
- [#134](https://github.com/kumokit/functions/issues/134): Dynamic runners scaling.
|
||||||
- [#126](https://github.com/iron-io/functions/issues/126): Detect OS and disable Memory profiling if needed.
|
- [#126](https://github.com/kumokit/functions/issues/126): Detect OS and disable Memory profiling if needed.
|
||||||
- [#72](https://github.com/iron-io/functions/issues/72): Should the input stream include a headers section, just like HTTP?.
|
- [#72](https://github.com/kumokit/functions/issues/72): Should the input stream include a headers section, just like HTTP?.
|
||||||
- [#69](https://github.com/iron-io/functions/issues/69): How to run on Openstack.
|
- [#69](https://github.com/kumokit/functions/issues/69): How to run on Openstack.
|
||||||
- [#20](https://github.com/iron-io/functions/issues/20): Make function testing framework.
|
- [#20](https://github.com/kumokit/functions/issues/20): Make function testing framework.
|
||||||
- [#3](https://github.com/iron-io/functions/issues/3): Make "function tool" in ironcli.
|
- [#3](https://github.com/kumokit/functions/issues/3): Make "function tool" in ironcli.
|
||||||
- [#2](https://github.com/iron-io/functions/issues/2): Allow setting content-type on a route, then use that when responding.
|
- [#2](https://github.com/kumokit/functions/issues/2): Allow setting content-type on a route, then use that when responding.
|
||||||
|
|
||||||
## v0.1.0 [2016-11-18]
|
## v0.1.0 [2016-11-18]
|
||||||
|
|
||||||
|
|||||||
10
Makefile
10
Makefile
@@ -25,10 +25,10 @@ run:
|
|||||||
|
|
||||||
docker-dep:
|
docker-dep:
|
||||||
# todo: need to create a dep tool image for this (or just ditch this)
|
# todo: need to create a dep tool image for this (or just ditch this)
|
||||||
docker run --rm -it -v ${CURDIR}:/go/src/github.com/iron-io/functions -w /go/src/github.com/iron-io/functions treeder/glide install -v
|
docker run --rm -it -v ${CURDIR}:/go/src/github.com/kumokit/functions -w /go/src/github.com/kumokit/functions treeder/glide install -v
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
docker run --rm -v ${CURDIR}:/go/src/github.com/iron-io/functions -w /go/src/github.com/iron-io/functions iron/go:dev go build -o functions-alpine
|
docker run --rm -v ${CURDIR}:/go/src/github.com/kumokit/functions -w /go/src/github.com/kumokit/functions iron/go:dev go build -o functions-alpine
|
||||||
docker build -t iron/functions:latest .
|
docker build -t iron/functions:latest .
|
||||||
|
|
||||||
docker-run: docker-build
|
docker-run: docker-build
|
||||||
@@ -37,8 +37,8 @@ docker-run: docker-build
|
|||||||
docker-test:
|
docker-test:
|
||||||
docker run -ti --privileged --rm -e LOG_LEVEL=debug \
|
docker run -ti --privileged --rm -e LOG_LEVEL=debug \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
-v ${CURDIR}:/go/src/github.com/iron-io/functions \
|
-v ${CURDIR}:/go/src/github.com/kumokit/functions \
|
||||||
-w /go/src/github.com/iron-io/functions iron/go:dev go test \
|
-w /go/src/github.com/kumokit/functions iron/go:dev go test \
|
||||||
-v $(shell docker run -ti -v ${CURDIR}:/go/src/github.com/iron-io/functions -w /go/src/github.com/iron-io/functions -e GOPATH=/go golang:alpine sh -c 'go list ./... | grep -v vendor | grep -v examples | grep -v tool | grep -v fn | grep -v datastore')
|
-v $(shell docker run -ti -v ${CURDIR}:/go/src/github.com/kumokit/functions -w /go/src/github.com/kumokit/functions -e GOPATH=/go golang:alpine sh -c 'go list ./... | grep -v vendor | grep -v examples | grep -v tool | grep -v fn | grep -v datastore')
|
||||||
|
|
||||||
all: dep build
|
all: dep build
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||

|

|
||||||
|
|
||||||
[](https://circleci.com/gh/iron-io/functions)
|
[](https://circleci.com/gh/kumokit/functions)
|
||||||
[](https://godoc.org/github.com/iron-io/functions)
|
[](https://godoc.org/github.com/kumokit/functions)
|
||||||
|
|
||||||
Welcome to IronFunctions! The open source serverless platform.
|
Welcome to IronFunctions! The open source serverless platform.
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ Read more on [logging](docs/logging.md).
|
|||||||
docker run --rm -it --link functions:api -p 4000:4000 -e "API_URL=http://api:8080" iron/functions-ui
|
docker run --rm -it --link functions:api -p 4000:4000 -e "API_URL=http://api:8080" iron/functions-ui
|
||||||
```
|
```
|
||||||
|
|
||||||
For more information, see: https://github.com/iron-io/functions-ui
|
For more information, see: https://github.com/kumokit/functions-ui
|
||||||
|
|
||||||
## Writing Functions
|
## Writing Functions
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ See [docs/](docs/README.md) for full documentation.
|
|||||||
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
These are the high level roadmap goals. See [milestones](https://github.com/iron-io/functions/milestones) for detailed issues.
|
These are the high level roadmap goals. See [milestones](https://github.com/kumokit/functions/milestones) for detailed issues.
|
||||||
|
|
||||||
* ~~Alpha 1 - November 2016~~
|
* ~~Alpha 1 - November 2016~~
|
||||||
* Initial release of base framework
|
* Initial release of base framework
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/datastore/internal/datastoreutil"
|
"github.com/kumokit/functions/api/datastore/internal/datastoreutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BoltDatastore struct {
|
type BoltDatastore struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/datastore/internal/datastoretest"
|
"github.com/kumokit/functions/api/datastore/internal/datastoretest"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tmpBolt = "/tmp/func_test_bolt.db"
|
const tmpBolt = "/tmp/func_test_bolt.db"
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/iron-io/functions/api/datastore/bolt"
|
"github.com/kumokit/functions/api/datastore/bolt"
|
||||||
"github.com/iron-io/functions/api/datastore/mysql"
|
"github.com/kumokit/functions/api/datastore/mysql"
|
||||||
"github.com/iron-io/functions/api/datastore/postgres"
|
"github.com/kumokit/functions/api/datastore/postgres"
|
||||||
"github.com/iron-io/functions/api/datastore/redis"
|
"github.com/kumokit/functions/api/datastore/redis"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func New(dbURL string) (models.Datastore, error) {
|
func New(dbURL string) (models.Datastore, error) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package datastoreutil
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Datastore is a copy of models.Datastore, with additional comments on parameter guarantees.
|
// Datastore is a copy of models.Datastore, with additional comments on parameter guarantees.
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package datastore
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/datastore/internal/datastoreutil"
|
"github.com/kumokit/functions/api/datastore/internal/datastoreutil"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mock struct {
|
type mock struct {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package datastore
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/datastore/internal/datastoretest"
|
"github.com/kumokit/functions/api/datastore/internal/datastoretest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDatastore(t *testing.T) {
|
func TestDatastore(t *testing.T) {
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/go-sql-driver/mysql"
|
"github.com/go-sql-driver/mysql"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"github.com/iron-io/functions/api/datastore/internal/datastoreutil"
|
"github.com/kumokit/functions/api/datastore/internal/datastoreutil"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
const routesTableCreate = `CREATE TABLE IF NOT EXISTS routes (
|
const routesTableCreate = `CREATE TABLE IF NOT EXISTS routes (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/datastore/internal/datastoretest"
|
"github.com/kumokit/functions/api/datastore/internal/datastoretest"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tmpMysql = "mysql://root:root@tcp(%v:3307)/funcs"
|
const tmpMysql = "mysql://root:root@tcp(%v:3307)/funcs"
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/iron-io/functions/api/datastore/internal/datastoreutil"
|
"github.com/kumokit/functions/api/datastore/internal/datastoreutil"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/datastore/internal/datastoretest"
|
"github.com/kumokit/functions/api/datastore/internal/datastoretest"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tmpPostgres = "postgres://postgres@%v:15432/funcs?sslmode=disable"
|
const tmpPostgres = "postgres://postgres@%v:15432/funcs?sslmode=disable"
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/datastore/internal/datastoreutil"
|
"github.com/kumokit/functions/api/datastore/internal/datastoreutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RedisDataStore struct {
|
type RedisDataStore struct {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
"github.com/iron-io/functions/api/datastore/internal/datastoretest"
|
"github.com/kumokit/functions/api/datastore/internal/datastoretest"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tmpRedis = "redis://%v:6301/"
|
const tmpRedis = "redis://%v:6301/"
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BoltDbMQ struct {
|
type BoltDbMQ struct {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
mq_config "github.com/iron-io/iron_go3/config"
|
mq_config "github.com/kumokit/iron_go3/config"
|
||||||
ironmq "github.com/iron-io/iron_go3/mq"
|
ironmq "github.com/kumokit/iron_go3/mq"
|
||||||
)
|
)
|
||||||
|
|
||||||
type assoc struct {
|
type assoc struct {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/google/btree"
|
"github.com/google/btree"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MemoryMQ struct {
|
type MemoryMQ struct {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package mqs
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Mock struct {
|
type Mock struct {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// New will parse the URL and return the correct MQ implementation.
|
// New will parse the URL and return the correct MQ implementation.
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RedisMQ struct {
|
type RedisMQ struct {
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getTask(ctx context.Context, url string) (*models.Task, error) {
|
func getTask(ctx context.Context, url string) (*models.Task, error) {
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/mqs"
|
"github.com/kumokit/functions/api/mqs"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
func setLogBuffer() *bytes.Buffer {
|
func setLogBuffer() *bytes.Buffer {
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ import (
|
|||||||
|
|
||||||
"context"
|
"context"
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FuncLogger interface {
|
type FuncLogger interface {
|
||||||
Writer(context.Context, string, string, string, string) io.Writer
|
Writer(context.Context, string, string, string, string) io.Writer
|
||||||
}
|
}
|
||||||
|
|
||||||
// FuncLogger reads STDERR output from a container and outputs it in a parseable structured log format, see: https://github.com/iron-io/functions/issues/76
|
// FuncLogger reads STDERR output from a container and outputs it in a parseable structured log format, see: https://github.com/kumokit/functions/issues/76
|
||||||
type DefaultFuncLogger struct {
|
type DefaultFuncLogger struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MetricLogger interface {
|
type MetricLogger interface {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package protocol
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultProtocol is the protocol used by cold-containers
|
// DefaultProtocol is the protocol used by cold-containers
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errInvalidProtocol = errors.New("Invalid Protocol")
|
var errInvalidProtocol = errors.New("Invalid Protocol")
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"net/http/httputil"
|
"net/http/httputil"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HTTPProtocol converts stdin/stdout streams into HTTP/1.1 compliant
|
// HTTPProtocol converts stdin/stdout streams into HTTP/1.1 compliant
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
"github.com/iron-io/runner/drivers"
|
"github.com/kumokit/runner/drivers"
|
||||||
driverscommon "github.com/iron-io/runner/drivers"
|
driverscommon "github.com/kumokit/runner/drivers"
|
||||||
"github.com/iron-io/runner/drivers/docker"
|
"github.com/kumokit/runner/drivers/docker"
|
||||||
"github.com/iron-io/runner/drivers/mock"
|
"github.com/kumokit/runner/drivers/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Runner struct {
|
type Runner struct {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRunnerHello(t *testing.T) {
|
func TestRunnerHello(t *testing.T) {
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/docker/docker/cli/config/configfile"
|
"github.com/docker/docker/cli/config/configfile"
|
||||||
docker "github.com/fsouza/go-dockerclient"
|
docker "github.com/fsouza/go-dockerclient"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
"github.com/iron-io/runner/drivers"
|
"github.com/kumokit/runner/drivers"
|
||||||
)
|
)
|
||||||
|
|
||||||
var registries dockerRegistries
|
var registries dockerRegistries
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/iron-io/runner/drivers"
|
"github.com/kumokit/runner/drivers"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/iron-io/functions/api/runner/protocol"
|
"github.com/kumokit/functions/api/runner/protocol"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
"github.com/iron-io/runner/drivers"
|
"github.com/kumokit/runner/drivers"
|
||||||
)
|
)
|
||||||
|
|
||||||
// hot functions - theory of operation
|
// hot functions - theory of operation
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AppListener interface {
|
type AppListener interface {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleAppCreate(c *gin.Context) {
|
func (s *Server) handleAppCreate(c *gin.Context) {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleAppDelete(c *gin.Context) {
|
func (s *Server) handleAppDelete(c *gin.Context) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleAppGet(c *gin.Context) {
|
func (s *Server) handleAppGet(c *gin.Context) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleAppList(c *gin.Context) {
|
func (s *Server) handleAppList(c *gin.Context) {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api/datastore"
|
"github.com/kumokit/functions/api/datastore"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/mqs"
|
"github.com/kumokit/functions/api/mqs"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
func setLogBuffer() *bytes.Buffer {
|
func setLogBuffer() *bytes.Buffer {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleAppUpdate(c *gin.Context) {
|
func (s *Server) handleAppUpdate(c *gin.Context) {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ApiHandlerFunc func(w http.ResponseWriter, r *http.Request)
|
type ApiHandlerFunc func(w http.ResponseWriter, r *http.Request)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ package routecache
|
|||||||
import (
|
import (
|
||||||
"container/list"
|
"container/list"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Cache holds an internal linkedlist for hotness management. It is not safe
|
// Cache holds an internal linkedlist for hotness management. It is not safe
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Middleware is the interface required for implementing functions middlewar
|
// Middleware is the interface required for implementing functions middlewar
|
||||||
|
|||||||
@@ -7,5 +7,5 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func handlePing(c *gin.Context) {
|
func handlePing(c *gin.Context) {
|
||||||
c.JSON(http.StatusOK, gin.H{"hello": "world!", "goto": "https://github.com/iron-io/functions"})
|
c.JSON(http.StatusOK, gin.H{"hello": "world!", "goto": "https://github.com/kumokit/functions"})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleRouteCreate(c *gin.Context) {
|
func (s *Server) handleRouteCreate(c *gin.Context) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleRouteDelete(c *gin.Context) {
|
func (s *Server) handleRouteDelete(c *gin.Context) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleRouteGet(c *gin.Context) {
|
func (s *Server) handleRouteGet(c *gin.Context) {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleRouteList(c *gin.Context) {
|
func (s *Server) handleRouteList(c *gin.Context) {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/datastore"
|
"github.com/kumokit/functions/api/datastore"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/mqs"
|
"github.com/kumokit/functions/api/mqs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRouteCreate(t *testing.T) {
|
func TestRouteCreate(t *testing.T) {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleRouteUpdate(c *gin.Context) {
|
func (s *Server) handleRouteUpdate(c *gin.Context) {
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/runner"
|
"github.com/kumokit/functions/api/runner"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api/datastore"
|
"github.com/kumokit/functions/api/datastore"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/mqs"
|
"github.com/kumokit/functions/api/mqs"
|
||||||
"github.com/iron-io/functions/api/runner"
|
"github.com/kumokit/functions/api/runner"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
"github.com/iron-io/functions/api/server/internal/routecache"
|
"github.com/kumokit/functions/api/server/internal/routecache"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testRouterAsync(ds models.Datastore, mq models.MessageQueue, rnr *runner.Runner, tasks chan task.Request, enqueue models.Enqueue) *gin.Engine {
|
func testRouterAsync(ds models.Datastore, mq models.MessageQueue, rnr *runner.Runner, tasks chan task.Request, enqueue models.Enqueue) *gin.Engine {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package server
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RunnerListener interface {
|
type RunnerListener interface {
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/datastore"
|
"github.com/kumokit/functions/api/datastore"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/mqs"
|
"github.com/kumokit/functions/api/mqs"
|
||||||
"github.com/iron-io/functions/api/runner"
|
"github.com/kumokit/functions/api/runner"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testRunner(t *testing.T) (*runner.Runner, context.CancelFunc) {
|
func testRunner(t *testing.T) (*runner.Runner, context.CancelFunc) {
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ import (
|
|||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/ccirello/supervisor"
|
"github.com/ccirello/supervisor"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api"
|
"github.com/kumokit/functions/api"
|
||||||
"github.com/iron-io/functions/api/datastore"
|
"github.com/kumokit/functions/api/datastore"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/mqs"
|
"github.com/kumokit/functions/api/mqs"
|
||||||
"github.com/iron-io/functions/api/runner"
|
"github.com/kumokit/functions/api/runner"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
"github.com/iron-io/functions/api/server/internal/routecache"
|
"github.com/kumokit/functions/api/server/internal/routecache"
|
||||||
"github.com/iron-io/runner/common"
|
"github.com/kumokit/runner/common"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api/datastore"
|
"github.com/kumokit/functions/api/datastore"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/mqs"
|
"github.com/kumokit/functions/api/mqs"
|
||||||
"github.com/iron-io/functions/api/runner"
|
"github.com/kumokit/functions/api/runner"
|
||||||
"github.com/iron-io/functions/api/runner/task"
|
"github.com/kumokit/functions/api/runner/task"
|
||||||
"github.com/iron-io/functions/api/server/internal/routecache"
|
"github.com/kumokit/functions/api/server/internal/routecache"
|
||||||
)
|
)
|
||||||
|
|
||||||
var tmpBolt = "/tmp/func_test_bolt.db"
|
var tmpBolt = "/tmp/func_test_bolt.db"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// call is an in-flight or completed do call
|
// call is an in-flight or completed do call
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/iron-io/functions/api/version"
|
"github.com/kumokit/functions/api/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handleVersion(c *gin.Context) {
|
func handleVersion(c *gin.Context) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ function quick() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function build () {
|
function build () {
|
||||||
docker run --rm -v ${pwd}:/go/src/github.com/iron-io/functions -w /go/src/github.com/iron-io/functions iron/go:dev go build -o functions-alpine
|
docker run --rm -v ${pwd}:/go/src/github.com/kumokit/functions -w /go/src/github.com/kumokit/functions iron/go:dev go build -o functions-alpine
|
||||||
docker build -t iron/functions:latest .
|
docker build -t iron/functions:latest .
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ machine:
|
|||||||
GOPATH: $HOME/go
|
GOPATH: $HOME/go
|
||||||
GOROOT: $HOME/golang/go
|
GOROOT: $HOME/golang/go
|
||||||
PATH: $GOROOT/bin:$GOPATH/bin:/$PATH
|
PATH: $GOROOT/bin:$GOPATH/bin:/$PATH
|
||||||
GH_IRON: $GOPATH/src/github.com/iron-io
|
GH_IRON: $GOPATH/src/github.com/kumokit
|
||||||
GO_PROJECT: ../go/src/github.com/iron-io/$CIRCLE_PROJECT_REPONAME
|
GO_PROJECT: ../go/src/github.com/kumokit/$CIRCLE_PROJECT_REPONAME
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ test:
|
|||||||
deployment:
|
deployment:
|
||||||
release:
|
release:
|
||||||
branch: master
|
branch: master
|
||||||
owner: iron-io
|
owner: kumokit
|
||||||
commands:
|
commands:
|
||||||
- git config --global user.email "circleci@iron.io"
|
- git config --global user.email "circleci@iron.io"
|
||||||
- git config --global user.name "CircleCI"
|
- git config --global user.name "CircleCI"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ require 'openssl'
|
|||||||
|
|
||||||
require_relative 'utils.rb'
|
require_relative 'utils.rb'
|
||||||
|
|
||||||
swaggerUrl = "https://raw.githubusercontent.com/iron-io/functions/master/docs/swagger.yml"
|
swaggerUrl = "https://raw.githubusercontent.com/kumokit/functions/master/docs/swagger.yml"
|
||||||
spec = YAML.load(open(swaggerUrl))
|
spec = YAML.load(open(swaggerUrl))
|
||||||
version = spec['info']['version']
|
version = spec['info']['version']
|
||||||
puts "VERSION: #{version}"
|
puts "VERSION: #{version}"
|
||||||
@@ -23,7 +23,7 @@ def clone(lang)
|
|||||||
Dir.chdir 'tmp'
|
Dir.chdir 'tmp'
|
||||||
ldir = "functions_#{lang}"
|
ldir = "functions_#{lang}"
|
||||||
if !Dir.exist? ldir
|
if !Dir.exist? ldir
|
||||||
cmd = "git clone https://github.com/iron-io/#{ldir}"
|
cmd = "git clone https://github.com/kumokit/#{ldir}"
|
||||||
stream_exec(cmd)
|
stream_exec(cmd)
|
||||||
else
|
else
|
||||||
Dir.chdir ldir
|
Dir.chdir ldir
|
||||||
@@ -69,7 +69,7 @@ languages.each do |l|
|
|||||||
options['gemName'] = gem_name
|
options['gemName'] = gem_name
|
||||||
options['moduleName'] = "IronFunctions"
|
options['moduleName'] = "IronFunctions"
|
||||||
options['gemVersion'] = version
|
options['gemVersion'] = version
|
||||||
options['gemHomepage'] = "https://github.com/iron-io/#{fruby}"
|
options['gemHomepage'] = "https://github.com/kumokit/#{fruby}"
|
||||||
options['gemSummary'] = 'Ruby gem for IronFunctions'
|
options['gemSummary'] = 'Ruby gem for IronFunctions'
|
||||||
options['gemDescription'] = 'Ruby gem for IronFunctions.'
|
options['gemDescription'] = 'Ruby gem for IronFunctions.'
|
||||||
options['gemAuthorEmail'] = 'travis@iron.io'
|
options['gemAuthorEmail'] = 'travis@iron.io'
|
||||||
@@ -88,7 +88,7 @@ languages.each do |l|
|
|||||||
puts "SKIPPING GO, it's manual for now."
|
puts "SKIPPING GO, it's manual for now."
|
||||||
# This is using https://goswagger.io/ instead
|
# This is using https://goswagger.io/ instead
|
||||||
# TODO: run this build command instead: this works if run manually
|
# TODO: run this build command instead: this works if run manually
|
||||||
# dep ensure --update && docker run --rm -it -v $HOME/dev/go:/go -w /go/src/github.com/iron-io/functions_go quay.io/goswagger/swagger generate client -f https://raw.githubusercontent.com/iron-io/functions/master/docs/swagger.yml -A functions
|
# dep ensure --update && docker run --rm -it -v $HOME/dev/go:/go -w /go/src/github.com/kumokit/functions_go quay.io/goswagger/swagger generate client -f https://raw.githubusercontent.com/kumokit/functions/master/docs/swagger.yml -A functions
|
||||||
else
|
else
|
||||||
gen = JSON.parse(HTTP.post("https://generator.swagger.io/api/gen/clients/#{l}",
|
gen = JSON.parse(HTTP.post("https://generator.swagger.io/api/gen/clients/#{l}",
|
||||||
json: {
|
json: {
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ func main() {
|
|||||||
options["gemName"] = "iron_functions"
|
options["gemName"] = "iron_functions"
|
||||||
options["moduleName"] = "IronFunctions"
|
options["moduleName"] = "IronFunctions"
|
||||||
options["gemVersion"] = version
|
options["gemVersion"] = version
|
||||||
options["gemHomepage"] = "https://github.com/iron-io/functions_ruby"
|
options["gemHomepage"] = "https://github.com/kumokit/functions_ruby"
|
||||||
options["gemSummary"] = "Ruby gem for IronFunctions"
|
options["gemSummary"] = "Ruby gem for IronFunctions"
|
||||||
options["gemDescription"] = "Ruby gem for IronFunctions."
|
options["gemDescription"] = "Ruby gem for IronFunctions."
|
||||||
options["gemAuthorEmail"] = "travis@iron.io"
|
options["gemAuthorEmail"] = "travis@iron.io"
|
||||||
@@ -134,7 +134,7 @@ func main() {
|
|||||||
branch := fmt.Sprintf("update-version-%s", version)
|
branch := fmt.Sprintf("update-version-%s", version)
|
||||||
|
|
||||||
log.Printf("Cloning previous `%s` source...\n", language)
|
log.Printf("Cloning previous `%s` source...\n", language)
|
||||||
exec.Command("git", "clone", fmt.Sprintf("git@github.com:iron-io/functions_%s.git", short), srcDir).Run()
|
exec.Command("git", "clone", fmt.Sprintf("git@github.com:kumokit/functions_%s.git", short), srcDir).Run()
|
||||||
|
|
||||||
// Skip language specific files
|
// Skip language specific files
|
||||||
for _, skip := range skipFiles {
|
for _, skip := range skipFiles {
|
||||||
@@ -304,7 +304,7 @@ func genSwaggerClient(target string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command("docker", "run", "--rm", "-u", fmt.Sprintf("%s:%s", u.Uid, u.Gid), "-v", fmt.Sprintf("%s/%s:/go/src/github.com/iron-io/functions_go", cwd, target), "-v", fmt.Sprintf("%s/%s:/go/swagger.spec", cwd, swaggerURL), "-w", "/go/src", "quay.io/goswagger/swagger", "generate", "client", "-f", "/go/swagger.spec", "-t", "github.com/iron-io/functions_go", "-A", "functions")
|
cmd := exec.Command("docker", "run", "--rm", "-u", fmt.Sprintf("%s:%s", u.Uid, u.Gid), "-v", fmt.Sprintf("%s/%s:/go/src/github.com/kumokit/functions_go", cwd, target), "-v", fmt.Sprintf("%s/%s:/go/swagger.spec", cwd, swaggerURL), "-w", "/go/src", "quay.io/goswagger/swagger", "generate", "client", "-f", "/go/swagger.spec", "-t", "github.com/kumokit/functions_go", "-A", "functions")
|
||||||
d, err := cmd.CombinedOutput()
|
d, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error running go-swagger: %s\n", d)
|
log.Printf("Error running go-swagger: %s\n", d)
|
||||||
|
|||||||
2
doc.go
2
doc.go
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
IronFunctions daemon
|
IronFunctions daemon
|
||||||
|
|
||||||
Refer to detailed documentation at https://github.com/iron-io/functions/tree/master/docs
|
Refer to detailed documentation at https://github.com/kumokit/functions/tree/master/docs
|
||||||
|
|
||||||
Environment Variables:
|
Environment Variables:
|
||||||
DB_URL
|
DB_URL
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
If you are a developer using IronFunctions through the API, this section is for you.
|
If you are a developer using IronFunctions through the API, this section is for you.
|
||||||
|
|
||||||
* [Quickstart](https://github.com/iron-io/functions#quickstart)
|
* [Quickstart](https://github.com/kumokit/functions#quickstart)
|
||||||
* [Definitions](definitions.md)
|
* [Definitions](definitions.md)
|
||||||
* [fn (CLI Tool)](/fn/README.md)
|
* [fn (CLI Tool)](/fn/README.md)
|
||||||
* [Writing functions](writing.md)
|
* [Writing functions](writing.md)
|
||||||
@@ -14,7 +14,7 @@ If you are a developer using IronFunctions through the API, this section is for
|
|||||||
* [Function file (func.yaml)](function-file.md)
|
* [Function file (func.yaml)](function-file.md)
|
||||||
* [Packaging functions](packaging.md)
|
* [Packaging functions](packaging.md)
|
||||||
* [Open Function Format](function-format.md)
|
* [Open Function Format](function-format.md)
|
||||||
* [API Reference](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/iron-io/functions/master/docs/swagger.yml)
|
* [API Reference](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/kumokit/functions/master/docs/swagger.yml)
|
||||||
* [Hot functions](hot-functions.md)
|
* [Hot functions](hot-functions.md)
|
||||||
|
|
||||||
## For Operators
|
## For Operators
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ input/output.
|
|||||||
|
|
||||||
## Implementing a hot function
|
## Implementing a hot function
|
||||||
|
|
||||||
In the [examples directory](https://github.com/iron-io/functions/blob/master/examples/hotfunctions/http/func.go), there is one simple implementation of a hot function
|
In the [examples directory](https://github.com/kumokit/functions/blob/master/examples/hotfunctions/http/func.go), there is one simple implementation of a hot function
|
||||||
which we are going to get in the details here.
|
which we are going to get in the details here.
|
||||||
|
|
||||||
The basic cycle comprises three steps: read standard input up to a previosly
|
The basic cycle comprises three steps: read standard input up to a previosly
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ such assumptions, please rewrite it.
|
|||||||
* ImageMagick version [6.9.3][magickv] and nodejs [wrapper 6.9.3][magickwrapperv]
|
* ImageMagick version [6.9.3][magickv] and nodejs [wrapper 6.9.3][magickwrapperv]
|
||||||
* aws-sdk version [2.2.12][awsnodev]
|
* aws-sdk version [2.2.12][awsnodev]
|
||||||
|
|
||||||
[iron/node]: https://github.com/iron-io/dockers/blob/master/node/Dockerfile
|
[iron/node]: https://github.com/kumokit/dockers/blob/master/node/Dockerfile
|
||||||
[magickv]: https://pkgs.alpinelinux.org/package/main/x86_64/imagemagick
|
[magickv]: https://pkgs.alpinelinux.org/package/main/x86_64/imagemagick
|
||||||
[magickwrapperv]: https://www.npmjs.com/package/imagemagick
|
[magickwrapperv]: https://www.npmjs.com/package/imagemagick
|
||||||
[awsnodev]: https://aws.amazon.com/sdk-for-node-js/
|
[awsnodev]: https://aws.amazon.com/sdk-for-node-js/
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
This guide will walk you through creating and testing a simple Lambda function.
|
This guide will walk you through creating and testing a simple Lambda function.
|
||||||
|
|
||||||
We need the the `fn` tool for the rest of this guide. You can install it
|
We need the the `fn` tool for the rest of this guide. You can install it
|
||||||
by following [these instructions](https://github.com/iron-io/function/fn).
|
by following [these instructions](https://github.com/kumokit/function/fn).
|
||||||
|
|
||||||
*For this getting started we are assuming you already have working lambda function code available, if not head to the [import instructions] (import.md) and skip the next section.*
|
*For this getting started we are assuming you already have working lambda function code available, if not head to the [import instructions] (import.md) and skip the next section.*
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Import existing AWS Lambda functions
|
Import existing AWS Lambda functions
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
The [fn](https://github.com/iron-io/functions/fn/) tool includes a set of
|
The [fn](https://github.com/kumokit/functions/fn/) tool includes a set of
|
||||||
commands to act on Lambda functions. Most of these are described in
|
commands to act on Lambda functions. Most of these are described in
|
||||||
[getting-started](./getting-started.md). One more subcommand is `aws-import`.
|
[getting-started](./getting-started.md). One more subcommand is `aws-import`.
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ Listeners are the main way to extend IronFunctions.
|
|||||||
|
|
||||||
The following listener types are supported:
|
The following listener types are supported:
|
||||||
|
|
||||||
* App Listeners - [GoDoc](https://godoc.org/github.com/iron-io/functions/api/server#AppListener)
|
* App Listeners - [GoDoc](https://godoc.org/github.com/kumokit/functions/api/server#AppListener)
|
||||||
* Runner Listeners - [GoDoc](https://godoc.org/github.com/iron-io/functions/api/server#RunnerListener)
|
* Runner Listeners - [GoDoc](https://godoc.org/github.com/kumokit/functions/api/server#RunnerListener)
|
||||||
|
|
||||||
### Creating a Listener
|
### Creating a Listener
|
||||||
|
|
||||||
@@ -29,8 +29,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/server"
|
"github.com/kumokit/functions/api/server"
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type myCustomListener struct{}
|
type myCustomListener struct{}
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ TODO: List all metrics we emit to logs.
|
|||||||
|
|
||||||
## Statsd
|
## Statsd
|
||||||
|
|
||||||
The [Logspout Statsd Adapter](https://github.com/iron-io/logspout-statsd) adapter can parse the log metrics and forward
|
The [Logspout Statsd Adapter](https://github.com/kumokit/logspout-statsd) adapter can parse the log metrics and forward
|
||||||
them to any statsd server.
|
them to any statsd server.
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Here's a rough diagram of what a production deployment looks like:
|
|||||||
|
|
||||||
Any load balancer will work, put every instance of IronFunctions that you run behind the load balancer.
|
Any load balancer will work, put every instance of IronFunctions that you run behind the load balancer.
|
||||||
|
|
||||||
**Note**: We will work on a smart load balancer that can direct traffic in a smarter way. See [#151](https://github.com/iron-io/functions/issues/151).
|
**Note**: We will work on a smart load balancer that can direct traffic in a smarter way. See [#151](https://github.com/kumokit/functions/issues/151).
|
||||||
|
|
||||||
## Database
|
## Database
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ The message queue is pluggable and we currently support a few options that can b
|
|||||||
## Logging, Metrics and Monitoring
|
## Logging, Metrics and Monitoring
|
||||||
|
|
||||||
Logging is a particularly important part of IronFunctions. It not only emits logs, but metrics are also emitted to the logs. Ops teams can then decide how they want
|
Logging is a particularly important part of IronFunctions. It not only emits logs, but metrics are also emitted to the logs. Ops teams can then decide how they want
|
||||||
to use the logs and metrics without us prescribing a particular technology. For instance, you can [logspout-statsd](https://github.com/iron-io/logspout-statsd) to capture metrics
|
to use the logs and metrics without us prescribing a particular technology. For instance, you can [logspout-statsd](https://github.com/kumokit/logspout-statsd) to capture metrics
|
||||||
from the logs and forward them to statsd.
|
from the logs and forward them to statsd.
|
||||||
|
|
||||||
[More about Metrics](metrics.md)
|
[More about Metrics](metrics.md)
|
||||||
|
|||||||
@@ -6,4 +6,4 @@
|
|||||||
docker run --rm -it --link functions:api -p 4000:4000 -e "API_URL=http://api:8080" iron/functions-ui
|
docker run --rm -it --link functions:api -p 4000:4000 -e "API_URL=http://api:8080" iron/functions-ui
|
||||||
```
|
```
|
||||||
|
|
||||||
For more information, see: https://github.com/iron-io/functions-ui
|
For more information, see: https://github.com/kumokit/functions-ui
|
||||||
|
|||||||
@@ -532,7 +532,7 @@ definitions:
|
|||||||
payload:
|
payload:
|
||||||
type: string
|
type: string
|
||||||
# 256k
|
# 256k
|
||||||
# maxLength breaks ruby generator too: https://github.com/iron-io/worker_ruby/blob/0aa9236ce5060af3f15758937712973f80dd54fe/lib/iron_titan/models/task.rb#L272
|
# maxLength breaks ruby generator too: https://github.com/kumokit/worker_ruby/blob/0aa9236ce5060af3f15758937712973f80dd54fe/lib/iron_titan/models/task.rb#L272
|
||||||
# maxLength: 268435456
|
# maxLength: 268435456
|
||||||
description: Payload for the task. This is what you pass into each task to make it do something.
|
description: Payload for the task. This is what you pass into each task to make it do something.
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ This will give you the basic overview of writing base level functions. You can a
|
|||||||
abstractions that make it easier such as [lambda](lambda/README.md).
|
abstractions that make it easier such as [lambda](lambda/README.md).
|
||||||
|
|
||||||
Also, for complete examples in various languages, see the [examples directory](/examples).
|
Also, for complete examples in various languages, see the [examples directory](/examples).
|
||||||
We have language libraries for [Go](https://github.com/iron-io/functions_go), [Javascript](https://github.com/iron-io/functions_js) and
|
We have language libraries for [Go](https://github.com/kumokit/functions_go), [Javascript](https://github.com/kumokit/functions_js) and
|
||||||
[Ruby](https://github.com/iron-io/functions_ruby).
|
[Ruby](https://github.com/kumokit/functions_ruby).
|
||||||
|
|
||||||
## Code
|
## Code
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package database
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/iron-io/functions/examples/blog/models"
|
"github.com/kumokit/functions/examples/blog/models"
|
||||||
"gopkg.in/mgo.v2"
|
"gopkg.in/mgo.v2"
|
||||||
"gopkg.in/mgo.v2/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/iron-io/functions/examples/blog/models"
|
"github.com/kumokit/functions/examples/blog/models"
|
||||||
"gopkg.in/mgo.v2"
|
"gopkg.in/mgo.v2"
|
||||||
"gopkg.in/mgo.v2/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/iron-io/functions/examples/blog/database"
|
"github.com/kumokit/functions/examples/blog/database"
|
||||||
"github.com/iron-io/functions/examples/blog/models"
|
"github.com/kumokit/functions/examples/blog/models"
|
||||||
"github.com/iron-io/functions/examples/blog/routes"
|
"github.com/kumokit/functions/examples/blog/routes"
|
||||||
)
|
)
|
||||||
|
|
||||||
var noAuth = map[string]interface{}{}
|
var noAuth = map[string]interface{}{}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package: github.com/iron-io/functions/examples/blog
|
package: github.com/kumokit/functions/examples/blog
|
||||||
import:
|
import:
|
||||||
- package: github.com/dgrijalva/jwt-go
|
- package: github.com/dgrijalva/jwt-go
|
||||||
version: ^3.0.0
|
version: ^3.0.0
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/iron-io/functions/examples/blog/database"
|
"github.com/kumokit/functions/examples/blog/database"
|
||||||
"github.com/iron-io/functions/examples/blog/models"
|
"github.com/kumokit/functions/examples/blog/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func HandlePostCreate(db *database.Database, auth map[string]interface{}) {
|
func HandlePostCreate(db *database.Database, auth map[string]interface{}) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package route
|
package route
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/iron-io/functions/examples/blog/database"
|
"github.com/kumokit/functions/examples/blog/database"
|
||||||
"gopkg.in/mgo.v2/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package route
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/iron-io/functions/examples/blog/database"
|
"github.com/kumokit/functions/examples/blog/database"
|
||||||
)
|
)
|
||||||
|
|
||||||
func HandlePostRead(db *database.Database, auth map[string]interface{}) {
|
func HandlePostRead(db *database.Database, auth map[string]interface{}) {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"github.com/iron-io/functions/examples/blog/database"
|
"github.com/kumokit/functions/examples/blog/database"
|
||||||
"github.com/iron-io/functions/examples/blog/models"
|
"github.com/kumokit/functions/examples/blog/models"
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Simple example of IronFunctions load balancer using Caddy Server
|
|||||||
|
|
||||||
Start the IronFunctions instances
|
Start the IronFunctions instances
|
||||||
|
|
||||||
Ref: https://github.com/iron-io/functions/blob/master/README.md#start-the-ironfunctions-api
|
Ref: https://github.com/kumokit/functions/blob/master/README.md#start-the-ironfunctions-api
|
||||||
|
|
||||||
|
|
||||||
## Configure environment variable
|
## Configure environment variable
|
||||||
@@ -38,7 +38,7 @@ docker run --rm \
|
|||||||
|
|
||||||
Follow the Quick-Start steps replacing the example hosts by the Caddy host (localhost:9000)
|
Follow the Quick-Start steps replacing the example hosts by the Caddy host (localhost:9000)
|
||||||
|
|
||||||
https://github.com/iron-io/functions/blob/master/README.md#quick-start
|
https://github.com/kumokit/functions/blob/master/README.md#quick-start
|
||||||
|
|
||||||
|
|
||||||
## Docker Compose example
|
## Docker Compose example
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"html"
|
"html"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/server"
|
"github.com/kumokit/functions/api/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/iron-io/functions/api/models"
|
"github.com/kumokit/functions/api/models"
|
||||||
"github.com/iron-io/functions/api/server"
|
"github.com/kumokit/functions/api/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package: github.com/iron-io/functions/examples/postgres
|
package: github.com/kumokit/functions/examples/postgres
|
||||||
import:
|
import:
|
||||||
- package: github.com/lib/pq
|
- package: github.com/lib/pq
|
||||||
- package: github.com/pkg/errors
|
- package: github.com/pkg/errors
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package: github.com/iron-io/functions/examples/redis
|
package: github.com/kumokit/functions/examples/redis
|
||||||
import:
|
import:
|
||||||
- package: github.com/garyburd/redigo
|
- package: github.com/garyburd/redigo
|
||||||
version: ^1.0.0
|
version: ^1.0.0
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package: github.com/iron-io/functions/examples/twitter
|
package: github.com/kumokit/functions/examples/twitter
|
||||||
import:
|
import:
|
||||||
- package: github.com/dghubble/go-twitter
|
- package: github.com/dghubble/go-twitter
|
||||||
subpackages:
|
subpackages:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
httptransport "github.com/go-openapi/runtime/client"
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
fnclient "github.com/iron-io/functions_go/client"
|
fnclient "github.com/kumokit/functions_go/client"
|
||||||
"log"
|
"log"
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"context"
|
"context"
|
||||||
"github.com/iron-io/functions_go"
|
"github.com/kumokit/functions_go"
|
||||||
fnclient "github.com/iron-io/functions_go/client"
|
fnclient "github.com/kumokit/functions_go/client"
|
||||||
apiapps "github.com/iron-io/functions_go/client/apps"
|
apiapps "github.com/kumokit/functions_go/client/apps"
|
||||||
"github.com/iron-io/functions_go/models"
|
"github.com/kumokit/functions_go/models"
|
||||||
"github.com/jmoiron/jsonq"
|
"github.com/jmoiron/jsonq"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
"strings"
|
"strings"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/iron-io/functions/fn/langs"
|
"github.com/kumokit/functions/fn/langs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func verbwriter(verbose bool) io.Writer {
|
func verbwriter(verbose bool) io.Writer {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
functions "github.com/iron-io/functions_go"
|
functions "github.com/kumokit/functions_go"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
6
fn/glide.lock
generated
6
fn/glide.lock
generated
@@ -109,7 +109,7 @@ imports:
|
|||||||
version: 24dc7ba4bc1ef9215048b28e7248f99c42901db5
|
version: 24dc7ba4bc1ef9215048b28e7248f99c42901db5
|
||||||
- name: github.com/hashicorp/go-cleanhttp
|
- name: github.com/hashicorp/go-cleanhttp
|
||||||
version: ad28ea4487f05916463e2423a55166280e8254b5
|
version: ad28ea4487f05916463e2423a55166280e8254b5
|
||||||
- name: github.com/iron-io/functions_go
|
- name: github.com/kumokit/functions_go
|
||||||
version: 69e4dec8454c3c710045263c2ede76139c141146
|
version: 69e4dec8454c3c710045263c2ede76139c141146
|
||||||
subpackages:
|
subpackages:
|
||||||
- client
|
- client
|
||||||
@@ -118,13 +118,13 @@ imports:
|
|||||||
- client/tasks
|
- client/tasks
|
||||||
- client/version
|
- client/version
|
||||||
- models
|
- models
|
||||||
- name: github.com/iron-io/iron_go3
|
- name: github.com/kumokit/iron_go3
|
||||||
version: b50ecf8ff90187fc5fabccd9d028dd461adce4ee
|
version: b50ecf8ff90187fc5fabccd9d028dd461adce4ee
|
||||||
subpackages:
|
subpackages:
|
||||||
- api
|
- api
|
||||||
- config
|
- config
|
||||||
- worker
|
- worker
|
||||||
- name: github.com/iron-io/lambda
|
- name: github.com/kumokit/lambda
|
||||||
version: 4a046af3249dd5933a8d328f965e9717c97fef24
|
version: 4a046af3249dd5933a8d328f965e9717c97fef24
|
||||||
subpackages:
|
subpackages:
|
||||||
- lambda
|
- lambda
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package: github.com/iron-io/functions/fn
|
package: github.com/kumokit/functions/fn
|
||||||
import:
|
import:
|
||||||
- package: github.com/aws/aws-sdk-go
|
- package: github.com/aws/aws-sdk-go
|
||||||
subpackages:
|
subpackages:
|
||||||
@@ -13,9 +13,9 @@ import:
|
|||||||
subpackages:
|
subpackages:
|
||||||
- bump
|
- bump
|
||||||
- storage
|
- storage
|
||||||
- package: github.com/iron-io/functions_go
|
- package: github.com/kumokit/functions_go
|
||||||
version: f38f2174656467ec3ed404b7294e9ee172573e43
|
version: f38f2174656467ec3ed404b7294e9ee172573e43
|
||||||
- package: github.com/iron-io/lambda
|
- package: github.com/kumokit/lambda
|
||||||
subpackages:
|
subpackages:
|
||||||
- lambda
|
- lambda
|
||||||
- package: github.com/urfave/cli
|
- package: github.com/urfave/cli
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/iron-io/functions_go"
|
"github.com/kumokit/functions_go"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import (
|
|||||||
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/iron-io/functions/fn/langs"
|
"github.com/kumokit/functions/fn/langs"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
url='https://github.com/iron-io/functions/releases/download'
|
url='https://github.com/kumokit/functions/releases/download'
|
||||||
|
|
||||||
# perform some very rudimentary platform detection
|
# perform some very rudimentary platform detection
|
||||||
case "$(uname)" in
|
case "$(uname)" in
|
||||||
@@ -84,7 +84,7 @@ cat >&2 <<'EOF'
|
|||||||
installer script (yet - PRs welcome! [fn/install]).
|
installer script (yet - PRs welcome! [fn/install]).
|
||||||
Please visit the following URL for more detailed installation instructions:
|
Please visit the following URL for more detailed installation instructions:
|
||||||
|
|
||||||
https://github.com/iron-io/functions
|
https://github.com/kumokit/functions
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
vers "github.com/iron-io/functions/api/version"
|
vers "github.com/kumokit/functions/api/version"
|
||||||
functions "github.com/iron-io/functions_go"
|
functions "github.com/kumokit/functions_go"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ func newFn() *cli.App {
|
|||||||
app.Version = vers.Version
|
app.Version = vers.Version
|
||||||
app.Authors = []cli.Author{{Name: "iron.io"}}
|
app.Authors = []cli.Author{{Name: "iron.io"}}
|
||||||
app.Description = "IronFunctions command line tools"
|
app.Description = "IronFunctions command line tools"
|
||||||
app.UsageText = `Check the manual at https://github.com/iron-io/functions/blob/master/fn/README.md`
|
app.UsageText = `Check the manual at https://github.com/kumokit/functions/blob/master/fn/README.md`
|
||||||
|
|
||||||
cli.AppHelpTemplate = `{{.Name}} {{.Version}}{{if .Description}}
|
cli.AppHelpTemplate = `{{.Name}} {{.Version}}{{if .Description}}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user