Storage service and client (#300)
A very rudimentary storage service for archives larger than what can fit in TPR/CRD resources. The library used allows for using local files, AWS S3, or other cloud storage APIs. For now only local paths are set up. The storage service doesn't know anything about functions or packages; it can be used for arbitrary archives. There's no CLI integration yet.
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
#!/bin/sh
|
||||
GOOS=linux GOARCH=386 go build
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
|
||||
|
||||
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/docopt/docopt-go"
|
||||
@@ -11,6 +12,7 @@ import (
|
||||
"github.com/fission/fission/mqtrigger"
|
||||
"github.com/fission/fission/poolmgr"
|
||||
"github.com/fission/fission/router"
|
||||
"github.com/fission/fission/storagesvc"
|
||||
"github.com/fission/fission/timer"
|
||||
)
|
||||
|
||||
@@ -57,6 +59,15 @@ func runMessageQueueMgr(routerUrl string) {
|
||||
}
|
||||
}
|
||||
|
||||
func runStorageSvc(port int, filePath string) {
|
||||
subdir := os.Getenv("SUBDIR")
|
||||
if len(subdir) == 0 {
|
||||
subdir = "fission-functions"
|
||||
}
|
||||
storagesvc.RunStorageService(storagesvc.StorageTypeLocal,
|
||||
filePath, subdir, port)
|
||||
}
|
||||
|
||||
func getPort(portArg interface{}) int {
|
||||
portArgStr := portArg.(string)
|
||||
port, err := strconv.Atoi(portArgStr)
|
||||
|
||||
Reference in New Issue
Block a user