mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Rename to GitHub (#3)
* circle * Rename to github and fn->cli * Rename to github and fn->cli
This commit is contained in:
@@ -5,9 +5,34 @@ version: 2
|
||||
jobs:
|
||||
build:
|
||||
machine: true
|
||||
# update docker
|
||||
- run: docker version
|
||||
- run: sudo service docker stop
|
||||
- run: curl -fsSL https://get.docker.com/ | sudo sh
|
||||
- run: docker version
|
||||
- run: ./test.sh
|
||||
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
|
||||
steps:
|
||||
- checkout
|
||||
# update docker
|
||||
- run: docker version
|
||||
- run: sudo service docker stop
|
||||
- run: curl -fsSL https://get.docker.com/ | sudo sh
|
||||
- run: docker version
|
||||
- run: ./test.sh
|
||||
|
||||
|
||||
# docker:
|
||||
# # specify the version
|
||||
# - image: circleci/golang:1.8
|
||||
|
||||
# # Specify service dependencies here if necessary
|
||||
# # CircleCI maintains a library of pre-built images
|
||||
# # documented at https://circleci.com/docs/2.0/circleci-images/
|
||||
# # - image: circleci/postgres:9.4
|
||||
|
||||
# #### TEMPLATE_NOTE: go expects specific checkout path representing url
|
||||
# #### expecting it in the form of
|
||||
# #### /go/src/github.com/circleci/go-tool
|
||||
# #### /go/src/bitbucket.org/circleci/go-tool
|
||||
# working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
|
||||
# steps:
|
||||
# - checkout
|
||||
|
||||
# # specify any bash command here prefixed with `run: `
|
||||
# # - run: go get -v -t -d ./...
|
||||
# - run: ./test.sh
|
||||
|
||||
@@ -13,7 +13,7 @@ stages:
|
||||
before_script:
|
||||
- mkdir -p "${GOPATH}/src/gitlab-odx.oracle.com/odx/"
|
||||
- ln -s `pwd` "${GOPATH}/src/gitlab-odx.oracle.com/odx/"
|
||||
- cd "${GOPATH}/src/gitlab-odx.oracle.com/odx/functions"
|
||||
- cd "${GOPATH}/src/github.com/fnproject/fn"
|
||||
|
||||
build_job:
|
||||
stage: build
|
||||
|
||||
10
Makefile
10
Makefile
@@ -30,11 +30,11 @@ run: build
|
||||
|
||||
docker-dep:
|
||||
# todo: need to create a dep tool image for this (or just ditch this)
|
||||
docker run --rm -it -v ${CURDIR}:/go/src/gitlab-odx.oracle.com/odx/functions -w /go/src/gitlab-odx.oracle.com/odx/functions treeder/glide install -v
|
||||
docker run --rm -it -v ${CURDIR}:/go/src/github.com/fnproject/fn -w /go/src/github.com/fnproject/fn treeder/glide install -v
|
||||
|
||||
docker-build:
|
||||
docker pull funcy/go:dev
|
||||
docker run --rm -v ${CURDIR}:/go/src/gitlab-odx.oracle.com/odx/functions -w /go/src/gitlab-odx.oracle.com/odx/functions funcy/go:dev go build -o functions-alpine
|
||||
docker run --rm -v ${CURDIR}:/go/src/github.com/fnproject/fn -w /go/src/github.com/fnproject/fn funcy/go:dev go build -o functions-alpine
|
||||
docker build --build-arg HTTP_PROXY -t funcy/functions:latest .
|
||||
|
||||
docker-run: docker-build
|
||||
@@ -52,9 +52,9 @@ docker-test-run-with-postgres:
|
||||
docker-test:
|
||||
docker run -ti --privileged --rm -e LOG_LEVEL=debug \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v ${CURDIR}:/go/src/gitlab-odx.oracle.com/odx/functions \
|
||||
-w /go/src/gitlab-odx.oracle.com/odx/functions \
|
||||
-v ${CURDIR}:/go/src/github.com/fnproject/fn \
|
||||
-w /go/src/github.com/fnproject/fn \
|
||||
funcy/go:dev go test \
|
||||
-v $(shell docker run --rm -ti -v ${CURDIR}:/go/src/gitlab-odx.oracle.com/odx/functions -w /go/src/gitlab-odx.oracle.com/odx/functions -e GOPATH=/go golang:alpine sh -c 'go list ./... | grep -v vendor | grep -v examples | grep -v tool | grep -v fn')
|
||||
-v $(shell docker run --rm -ti -v ${CURDIR}:/go/src/github.com/fnproject/fn -w /go/src/github.com/fnproject/fn -e GOPATH=/go golang:alpine sh -c 'go list ./... | grep -v vendor | grep -v examples | grep -v tool | grep -v fn')
|
||||
|
||||
all: dep build
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Oracle Functions [](https://gitlab-odx.oracle.com/odx/functions/commits/master)
|
||||
# Oracle Functions [](https://github.com/fnproject/fn/commits/master)
|
||||
|
||||
<!-- [](https://godoc.org/github.com/treeder/functions) -->
|
||||
|
||||
@@ -52,7 +52,7 @@ export API_URL=http://129.146.10.253:80
|
||||
|
||||
Download the pre-built CLI binary:
|
||||
|
||||
1. Visit: https://gitlab-odx.oracle.com/odx/functions/tree/master/fn/releases/download/0.3.2
|
||||
1. Visit: https://github.com/fnproject/fn/tree/master/fn/releases/download/0.3.2
|
||||
2. Download the CLI for your platform
|
||||
3. Put in /usr/local/bin
|
||||
4. chmod +x
|
||||
@@ -139,7 +139,7 @@ you can update your code and run `fn deploy myapp` again.
|
||||
|
||||
- TODO: Slack or Discord community
|
||||
- Learn how to [contribute](CONTRIBUTING.md)
|
||||
- See [milestones](https://gitlab-odx.oracle.com/odx/functions/milestones) for detailed issues
|
||||
- See [milestones](https://github.com/fnproject/fn/milestones) for detailed issues
|
||||
|
||||
|
||||
## User Interface
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"net/url"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoreutil"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore/sql"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/datastore/internal/datastoreutil"
|
||||
"github.com/fnproject/fn/api/datastore/sql"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
func New(dbURL string) (models.Datastore, error) {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/id"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/id"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
|
||||
"net/http"
|
||||
"reflect"
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
func MetricDS(ds models.Datastore) models.Datastore {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
// NewValidator returns a models.Datastore which validates certain arguments before delegating to ds.
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoreutil"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/logs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/datastore/internal/datastoreutil"
|
||||
"github.com/fnproject/fn/api/logs"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
type mock struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package datastore
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoretest"
|
||||
"github.com/fnproject/fn/api/datastore/internal/datastoretest"
|
||||
)
|
||||
|
||||
func TestDatastore(t *testing.T) {
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
_ "github.com/lib/pq"
|
||||
"github.com/mattn/go-sqlite3"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
// this aims to be an ANSI-SQL compliant package that uses only question
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"net/url"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore/sql"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/datastore/sql"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
func New(dbURL string) (models.FnLog, error) {
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore/sql"
|
||||
logTesting "gitlab-odx.oracle.com/odx/functions/api/logs/testing"
|
||||
"github.com/fnproject/fn/api/datastore/sql"
|
||||
logTesting "github.com/fnproject/fn/api/logs/testing"
|
||||
)
|
||||
|
||||
const tmpLogDb = "/tmp/func_test_log.db"
|
||||
|
||||
@@ -3,7 +3,7 @@ package logs
|
||||
import (
|
||||
"context"
|
||||
"github.com/pkg/errors"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
type mock struct {
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/id"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/id"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
var testApp = &models.App{
|
||||
|
||||
@@ -3,7 +3,7 @@ package logs
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
type FnLog interface {
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/boltdb/bolt"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
)
|
||||
|
||||
type BoltDbMQ struct {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/Sirupsen/logrus"
|
||||
mq_config "github.com/iron-io/iron_go3/config"
|
||||
ironmq "github.com/iron-io/iron_go3/mq"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
type assoc struct {
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/google/btree"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
)
|
||||
|
||||
type MemoryMQ struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package mqs
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
type Mock struct {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
// New will parse the URL and return the correct MQ implementation.
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/garyburd/redigo/redis"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
)
|
||||
|
||||
type RedisMQ struct {
|
||||
|
||||
@@ -16,9 +16,9 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
"github.com/fnproject/fn/api/runner/task"
|
||||
)
|
||||
|
||||
func getTask(ctx context.Context, url string) (*models.Task, error) {
|
||||
|
||||
@@ -15,12 +15,12 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/logs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"github.com/fnproject/fn/api/datastore"
|
||||
"github.com/fnproject/fn/api/logs"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/mqs"
|
||||
"github.com/fnproject/fn/api/runner/drivers"
|
||||
"github.com/fnproject/fn/api/runner/task"
|
||||
)
|
||||
|
||||
func setLogBuffer() *bytes.Buffer {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common/stats"
|
||||
"github.com/fnproject/fn/api/runner/common/stats"
|
||||
)
|
||||
|
||||
// An Environment is a long lived object that carries around 'configuration'
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
"github.com/fsouza/go-dockerclient"
|
||||
"github.com/heroku/docker-registry-client/registry"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
"github.com/fnproject/fn/api/runner/drivers"
|
||||
)
|
||||
|
||||
const hubURL = "https://registry.hub.docker.com"
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/fsouza/go-dockerclient"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"github.com/opentracing/opentracing-go/log"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/vrischmann/envconfig"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
"github.com/fnproject/fn/api/runner/drivers"
|
||||
)
|
||||
|
||||
type taskDockerTest struct {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||
"github.com/fnproject/fn/api/runner/drivers"
|
||||
)
|
||||
|
||||
func New() drivers.Driver {
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
)
|
||||
|
||||
// TODO kind of no reason to have FuncLogger interface... we can just do the thing.
|
||||
|
||||
@@ -3,7 +3,7 @@ package protocol
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"github.com/fnproject/fn/api/runner/task"
|
||||
)
|
||||
|
||||
// DefaultProtocol is the protocol used by cold-containers
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"errors"
|
||||
"io"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/task"
|
||||
)
|
||||
|
||||
var errInvalidProtocol = errors.New("Invalid Protocol")
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"net/http/httputil"
|
||||
"time"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/task"
|
||||
)
|
||||
|
||||
// HTTPProtocol converts stdin/stdout streams into HTTP/1.1 compliant
|
||||
|
||||
@@ -16,12 +16,12 @@ import (
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"github.com/opentracing/opentracing-go/log"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers/docker"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers/mock"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
"github.com/fnproject/fn/api/runner/drivers"
|
||||
"github.com/fnproject/fn/api/runner/drivers/docker"
|
||||
"github.com/fnproject/fn/api/runner/drivers/mock"
|
||||
"github.com/fnproject/fn/api/runner/task"
|
||||
)
|
||||
|
||||
// TODO clean all of this up, the exposed API is huge and incohesive,
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/id"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/logs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"github.com/fnproject/fn/api/datastore"
|
||||
"github.com/fnproject/fn/api/id"
|
||||
"github.com/fnproject/fn/api/logs"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/task"
|
||||
)
|
||||
|
||||
func TestRunnerHello(t *testing.T) {
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
|
||||
"github.com/docker/cli/cli/config/configfile"
|
||||
docker "github.com/fsouza/go-dockerclient"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"github.com/fnproject/fn/api/runner/drivers"
|
||||
"github.com/fnproject/fn/api/runner/task"
|
||||
)
|
||||
|
||||
var registries dockerRegistries
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||
"github.com/fnproject/fn/api/runner/drivers"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/id"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/protocol"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"github.com/fnproject/fn/api/id"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/drivers"
|
||||
"github.com/fnproject/fn/api/runner/protocol"
|
||||
"github.com/fnproject/fn/api/runner/task"
|
||||
)
|
||||
|
||||
// hot functions - theory of operation
|
||||
|
||||
@@ -3,7 +3,7 @@ package server
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
// AppListener is an interface used to inject custom code at key points in app lifecycle.
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
func (s *Server) handleAppCreate(c *gin.Context) {
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"github.com/fnproject/fn/api"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
)
|
||||
|
||||
func (s *Server) handleAppDelete(c *gin.Context) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"github.com/fnproject/fn/api"
|
||||
)
|
||||
|
||||
func (s *Server) handleAppGet(c *gin.Context) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
func (s *Server) handleAppList(c *gin.Context) {
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/logs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||
"github.com/fnproject/fn/api/datastore"
|
||||
"github.com/fnproject/fn/api/logs"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/mqs"
|
||||
)
|
||||
|
||||
func setLogBuffer() *bytes.Buffer {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
func (s *Server) handleAppUpdate(c *gin.Context) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"github.com/fnproject/fn/api"
|
||||
)
|
||||
|
||||
func (s *Server) handleCallGet(c *gin.Context) {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
func (s *Server) handleCallList(c *gin.Context) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"github.com/fnproject/fn/api"
|
||||
)
|
||||
|
||||
func (s *Server) handleCallLogGet(c *gin.Context) {
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
)
|
||||
|
||||
// ErrInternalServerError returned when something exceptional happens.
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
type ApiHandlerFunc func(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
/* handleRouteCreateOrUpdate is used to handle POST PUT and PATCH for routes.
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"path"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"github.com/fnproject/fn/api"
|
||||
)
|
||||
|
||||
func (s *Server) handleRouteDelete(c *gin.Context) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"path"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"github.com/fnproject/fn/api"
|
||||
)
|
||||
|
||||
func (s *Server) handleRouteGet(c *gin.Context) {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
func (s *Server) handleRouteList(c *gin.Context) {
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/logs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||
"github.com/fnproject/fn/api/datastore"
|
||||
"github.com/fnproject/fn/api/logs"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/mqs"
|
||||
)
|
||||
|
||||
type routeTestCase struct {
|
||||
|
||||
@@ -15,12 +15,12 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/go-openapi/strfmt"
|
||||
cache "github.com/patrickmn/go-cache"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/id"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"github.com/fnproject/fn/api"
|
||||
"github.com/fnproject/fn/api/id"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/runner"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
"github.com/fnproject/fn/api/runner/task"
|
||||
)
|
||||
|
||||
type runnerResponse struct {
|
||||
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
cache "github.com/patrickmn/go-cache"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner"
|
||||
"github.com/fnproject/fn/api/datastore"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/mqs"
|
||||
"github.com/fnproject/fn/api/runner"
|
||||
)
|
||||
|
||||
func testRouterAsync(ds models.Datastore, mq models.MessageQueue, rnr *runner.Runner, enqueue models.Enqueue) *gin.Engine {
|
||||
|
||||
@@ -2,7 +2,7 @@ package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
type RunnerListener interface {
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"testing"
|
||||
|
||||
"errors"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/logs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner"
|
||||
"github.com/fnproject/fn/api/datastore"
|
||||
"github.com/fnproject/fn/api/logs"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/mqs"
|
||||
"github.com/fnproject/fn/api/runner"
|
||||
)
|
||||
|
||||
func testRunner(t *testing.T) (*runner.Runner, context.CancelFunc) {
|
||||
|
||||
@@ -20,14 +20,14 @@ import (
|
||||
"github.com/openzipkin/zipkin-go-opentracing"
|
||||
"github.com/patrickmn/go-cache"
|
||||
"github.com/spf13/viper"
|
||||
"gitlab-odx.oracle.com/odx/functions/api"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/id"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/logs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||
"github.com/fnproject/fn/api"
|
||||
"github.com/fnproject/fn/api/datastore"
|
||||
"github.com/fnproject/fn/api/id"
|
||||
"github.com/fnproject/fn/api/logs"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/mqs"
|
||||
"github.com/fnproject/fn/api/runner"
|
||||
"github.com/fnproject/fn/api/runner/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -14,10 +14,10 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
cache "github.com/patrickmn/go-cache"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner"
|
||||
"github.com/fnproject/fn/api/datastore"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn/api/mqs"
|
||||
"github.com/fnproject/fn/api/runner"
|
||||
)
|
||||
|
||||
var tmpDatastoreTests = "/tmp/func_test_datastore.db"
|
||||
|
||||
@@ -3,7 +3,7 @@ package server
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"github.com/fnproject/fn/api/models"
|
||||
)
|
||||
|
||||
// SpecialHandler verysimilar to a handler but since it is not used as middle ware no way
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/version"
|
||||
"github.com/fnproject/fn/api/version"
|
||||
)
|
||||
|
||||
func handleVersion(c *gin.Context) {
|
||||
|
||||
0
fn/.gitignore → cli/.gitignore
vendored
0
fn/.gitignore → cli/.gitignore
vendored
@@ -25,4 +25,4 @@ release:
|
||||
GOOS=linux go build -o fn_linux
|
||||
GOOS=darwin go build -o fn_mac
|
||||
GOOS=windows go build -o fn.exe
|
||||
docker run --rm -v ${PWD}:/go/src/gitlab-odx.oracle.com/odx/functions/fn -w /go/src/gitlab-odx.oracle.com/odx/functions/fn funcy/go:dev go build -o fn_alpine
|
||||
docker run --rm -v ${PWD}:/go/src/github.com/fnproject/fn/cli -w /go/src/github.com/fnproject/fn/cli funcy/go:dev go build -o fn_alpine
|
||||
@@ -9,12 +9,12 @@ import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
client "github.com/fnproject/fn/cli/client"
|
||||
fnclient "github.com/funcy/functions_go/client"
|
||||
apiapps "github.com/funcy/functions_go/client/apps"
|
||||
"github.com/funcy/functions_go/models"
|
||||
"github.com/jmoiron/jsonq"
|
||||
"github.com/urfave/cli"
|
||||
client "gitlab-odx.oracle.com/odx/functions/fn/client"
|
||||
)
|
||||
|
||||
type appsCmd struct {
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
apicall "github.com/funcy/functions_go/client/call"
|
||||
"github.com/funcy/functions_go/models"
|
||||
"github.com/urfave/cli"
|
||||
client "gitlab-odx.oracle.com/odx/functions/fn/client"
|
||||
client "github.com/fnproject/fn/cli/client"
|
||||
)
|
||||
|
||||
type callsCmd struct {
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
"github.com/coreos/go-semver/semver"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/fn/langs"
|
||||
"github.com/fnproject/fn/cli/langs"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
functions "github.com/funcy/functions_go"
|
||||
"github.com/funcy/functions_go/models"
|
||||
"github.com/urfave/cli"
|
||||
client "gitlab-odx.oracle.com/odx/functions/fn/client"
|
||||
client "github.com/fnproject/fn/cli/client"
|
||||
)
|
||||
|
||||
func deploy() cli.Command {
|
||||
0
fn/glide.lock → cli/glide.lock
generated
0
fn/glide.lock → cli/glide.lock
generated
@@ -1,4 +1,4 @@
|
||||
package: gitlab-odx.oracle.com/odx/functions/fn
|
||||
package: github.com/fnproject/fn/cli
|
||||
import:
|
||||
- package: github.com/Sirupsen/logrus
|
||||
repo: https://github.com/sirupsen/logrus
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/urfave/cli"
|
||||
"gitlab-odx.oracle.com/odx/functions/fn/langs"
|
||||
"github.com/fnproject/fn/cli/langs"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -54,7 +54,7 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
url='https://gitlab-odx.oracle.com/odx/functions/fn/releases/download'
|
||||
url='https://github.com/fnproject/fn/cli/releases/download'
|
||||
|
||||
# perform some very rudimentary platform detection
|
||||
case "$(uname)" in
|
||||
@@ -84,7 +84,7 @@ cat >&2 <<'EOF'
|
||||
installer script (yet - PRs welcome! [fn/install]).
|
||||
Please visit the following URL for more detailed installation instructions:
|
||||
|
||||
https://gitlab-odx.oracle.com/odx/functions
|
||||
https://github.com/fnproject/fn
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
@@ -54,7 +54,7 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
url='https://gitlab-odx.oracle.com/odx/functions/fn/releases/download'
|
||||
url='https://github.com/fnproject/fn/cli/releases/download'
|
||||
|
||||
# perform some very rudimentary platform detection
|
||||
case "$(uname)" in
|
||||
@@ -84,7 +84,7 @@ cat >&2 <<'EOF'
|
||||
installer script (yet - PRs welcome! [fn/install]).
|
||||
Please visit the following URL for more detailed installation instructions:
|
||||
|
||||
https://gitlab-odx.oracle.com/odx/functions
|
||||
https://github.com/fnproject/fn
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user