Apply gofmt

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd) 2020-03-01 20:05:33 +00:00 committed by Alex Ellis
parent be8574ecd0
commit 70e7e0d25a
2 changed files with 14 additions and 14 deletions

View File

@ -173,7 +173,7 @@ func makeServiceDefinitions(archSuffix string) []pkg.Service {
wd, _ := os.Getwd() wd, _ := os.Getwd()
return []pkg.Service{ return []pkg.Service{
pkg.Service{ {
Name: "basic-auth-plugin", Name: "basic-auth-plugin",
Image: "docker.io/openfaas/basic-auth-plugin:0.18.10" + archSuffix, Image: "docker.io/openfaas/basic-auth-plugin:0.18.10" + archSuffix,
Env: []string{ Env: []string{
@ -183,11 +183,11 @@ func makeServiceDefinitions(archSuffix string) []pkg.Service {
"pass_filename=basic-auth-password", "pass_filename=basic-auth-password",
}, },
Mounts: []pkg.Mount{ Mounts: []pkg.Mount{
pkg.Mount{ {
Src: path.Join(path.Join(wd, "secrets"), "basic-auth-password"), Src: path.Join(path.Join(wd, "secrets"), "basic-auth-password"),
Dest: path.Join(containerSecretMountDir, "basic-auth-password"), Dest: path.Join(containerSecretMountDir, "basic-auth-password"),
}, },
pkg.Mount{ {
Src: path.Join(path.Join(wd, "secrets"), "basic-auth-user"), Src: path.Join(path.Join(wd, "secrets"), "basic-auth-user"),
Dest: path.Join(containerSecretMountDir, "basic-auth-user"), Dest: path.Join(containerSecretMountDir, "basic-auth-user"),
}, },
@ -195,26 +195,26 @@ func makeServiceDefinitions(archSuffix string) []pkg.Service {
Caps: []string{"CAP_NET_RAW"}, Caps: []string{"CAP_NET_RAW"},
Args: nil, Args: nil,
}, },
pkg.Service{ {
Name: "nats", Name: "nats",
Env: []string{""}, Env: []string{""},
Image: "docker.io/library/nats-streaming:0.11.2", Image: "docker.io/library/nats-streaming:0.11.2",
Caps: []string{}, Caps: []string{},
Args: []string{"/nats-streaming-server", "-m", "8222", "--store=memory", "--cluster_id=faas-cluster"}, Args: []string{"/nats-streaming-server", "-m", "8222", "--store=memory", "--cluster_id=faas-cluster"},
}, },
pkg.Service{ {
Name: "prometheus", Name: "prometheus",
Env: []string{}, Env: []string{},
Image: "docker.io/prom/prometheus:v2.14.0", Image: "docker.io/prom/prometheus:v2.14.0",
Mounts: []pkg.Mount{ Mounts: []pkg.Mount{
pkg.Mount{ {
Src: path.Join(wd, "prometheus.yml"), Src: path.Join(wd, "prometheus.yml"),
Dest: "/etc/prometheus/prometheus.yml", Dest: "/etc/prometheus/prometheus.yml",
}, },
}, },
Caps: []string{"CAP_NET_RAW"}, Caps: []string{"CAP_NET_RAW"},
}, },
pkg.Service{ {
Name: "gateway", Name: "gateway",
Env: []string{ Env: []string{
"basic_auth=true", "basic_auth=true",
@ -232,18 +232,18 @@ func makeServiceDefinitions(archSuffix string) []pkg.Service {
}, },
Image: "docker.io/openfaas/gateway:0.18.8" + archSuffix, Image: "docker.io/openfaas/gateway:0.18.8" + archSuffix,
Mounts: []pkg.Mount{ Mounts: []pkg.Mount{
pkg.Mount{ {
Src: path.Join(path.Join(wd, "secrets"), "basic-auth-password"), Src: path.Join(path.Join(wd, "secrets"), "basic-auth-password"),
Dest: path.Join(containerSecretMountDir, "basic-auth-password"), Dest: path.Join(containerSecretMountDir, "basic-auth-password"),
}, },
pkg.Mount{ {
Src: path.Join(path.Join(wd, "secrets"), "basic-auth-user"), Src: path.Join(path.Join(wd, "secrets"), "basic-auth-user"),
Dest: path.Join(containerSecretMountDir, "basic-auth-user"), Dest: path.Join(containerSecretMountDir, "basic-auth-user"),
}, },
}, },
Caps: []string{"CAP_NET_RAW"}, Caps: []string{"CAP_NET_RAW"},
}, },
pkg.Service{ {
Name: "queue-worker", Name: "queue-worker",
Env: []string{ Env: []string{
"faas_nats_address=nats", "faas_nats_address=nats",
@ -258,11 +258,11 @@ func makeServiceDefinitions(archSuffix string) []pkg.Service {
}, },
Image: "docker.io/openfaas/queue-worker:0.9.0", Image: "docker.io/openfaas/queue-worker:0.9.0",
Mounts: []pkg.Mount{ Mounts: []pkg.Mount{
pkg.Mount{ {
Src: path.Join(path.Join(wd, "secrets"), "basic-auth-password"), Src: path.Join(path.Join(wd, "secrets"), "basic-auth-password"),
Dest: path.Join(containerSecretMountDir, "basic-auth-password"), Dest: path.Join(containerSecretMountDir, "basic-auth-password"),
}, },
pkg.Mount{ {
Src: path.Join(path.Join(wd, "secrets"), "basic-auth-user"), Src: path.Join(path.Join(wd, "secrets"), "basic-auth-user"),
Dest: path.Join(containerSecretMountDir, "basic-auth-user"), Dest: path.Join(containerSecretMountDir, "basic-auth-user"),
}, },

View File

@ -8,12 +8,12 @@ import (
"log" "log"
"net/http" "net/http"
cninetwork "github.com/openfaas/faasd/pkg/cninetwork"
"github.com/openfaas/faasd/pkg/service"
"github.com/containerd/containerd" "github.com/containerd/containerd"
"github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/namespaces"
gocni "github.com/containerd/go-cni" gocni "github.com/containerd/go-cni"
"github.com/openfaas/faas/gateway/requests" "github.com/openfaas/faas/gateway/requests"
cninetwork "github.com/openfaas/faasd/pkg/cninetwork"
"github.com/openfaas/faasd/pkg/service"
) )
func MakeDeleteHandler(client *containerd.Client, cni gocni.CNI) func(w http.ResponseWriter, r *http.Request) { func MakeDeleteHandler(client *containerd.Client, cni gocni.CNI) func(w http.ResponseWriter, r *http.Request) {