Skip to content
This repository was archived by the owner on Nov 5, 2020. It is now read-only.

Commit bb15901

Browse files
committed
Fix package names
Signed-off-by: Edward Wilde <[email protected]>
1 parent febe85a commit bb15901

File tree

9 files changed

+33
-30
lines changed

9 files changed

+33
-30
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM golang:1.10.4 as build
22

3-
RUN mkdir -p /go/src/github.com/openfaas/faas-federation/
3+
RUN mkdir -p /go/src/github.com/ewilde/faas-federation/
44

5-
WORKDIR /go/src/github.com/openfaas/faas-federation
5+
WORKDIR /go/src/github.com/ewilde/faas-federation
66

77
COPY .git .git
88
COPY handlers handlers
@@ -46,6 +46,6 @@ EXPOSE 8080
4646
ENV http_proxy ""
4747
ENV https_proxy ""
4848

49-
COPY --from=build /go/src/github.com/openfaas/faas-federation/faas-federation .
49+
COPY --from=build /go/src/github.com/ewilde/faas-federation/faas-federation .
5050

5151
CMD ["./faas-federation"]

handlers/delete.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ package handlers
55

66
import (
77
"encoding/json"
8-
"github.com/openfaas/faas/gateway/requests"
9-
log "github.com/sirupsen/logrus"
108
"io/ioutil"
119
"net/http"
10+
11+
"github.com/openfaas/faas/gateway/requests"
12+
log "github.com/sirupsen/logrus"
1213
)
1314

1415
// MakeDeleteHandler delete a function

handlers/deploy.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ import (
77
"bytes"
88
"encoding/json"
99
"fmt"
10+
"io/ioutil"
11+
"net/http"
12+
13+
"github.com/ewilde/faas-federation/routing"
1014
"github.com/gorilla/mux"
11-
"github.com/openfaas/faas-federation/routing"
1215
"github.com/openfaas/faas/gateway/requests"
1316
log "github.com/sirupsen/logrus"
14-
"io/ioutil"
15-
"net/http"
1617
)
1718

1819
var functions = map[string]*requests.Function{}
20+
1921
// MakeDeployHandler creates a handler to create new functions in the cluster
2022
func MakeDeployHandler(proxy http.HandlerFunc, providerLookup routing.ProviderLookup) http.HandlerFunc {
2123
return func(w http.ResponseWriter, r *http.Request) {
@@ -59,4 +61,4 @@ func addToFunctionToCache(r *http.Request, providerLookup routing.ProviderLookup
5961
providerLookup.AddFunction(request)
6062
r.Body = ioutil.NopCloser(bytes.NewBuffer(body))
6163
return request, nil
62-
}
64+
}

handlers/deploy_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"testing"
88
"time"
99

10+
"github.com/ewilde/faas-federation/routing"
11+
acc "github.com/ewilde/faas-federation/testing"
1012
"github.com/gorilla/mux"
11-
"github.com/openfaas/faas-federation/routing"
12-
acc "github.com/openfaas/faas-federation/testing"
1313
"github.com/openfaas/faas-provider/proxy"
1414
)
1515

handlers/proxy.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"net/url"
1010
"time"
1111

12+
"github.com/ewilde/faas-federation/routing"
1213
"github.com/gorilla/mux"
13-
"github.com/openfaas/faas-federation/routing"
1414
log "github.com/sirupsen/logrus"
1515
)
1616

@@ -34,7 +34,6 @@ func MakeProxy() http.HandlerFunc {
3434
}
3535
}
3636

37-
3837
// FunctionLookup is a openfaas-provider proxy.BaseURLResolver that allows the
3938
// caller to verify that a function is resolvable.
4039
type FunctionLookup struct {
@@ -68,7 +67,6 @@ func (l *FunctionLookup) Resolve(name string) (u url.URL, err error) {
6867
return *providerURL, nil
6968
}
7069

71-
7270
// resolve the function by checking the available docker DNSRR resolution
7371
func (l *FunctionLookup) byDNSRoundRobin(ctx context.Context, name string) (string, error) {
7472
entries, lookupErr := l.dnsrrLookup(ctx, fmt.Sprintf("tasks.%s", name))
@@ -102,4 +100,4 @@ func lookupIP(ctx context.Context, host string) ([]net.IP, error) {
102100
ips[i] = ia.IP
103101
}
104102
return ips, nil
105-
}
103+
}

handlers/reader.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func MakeFunctionReader() http.HandlerFunc {
3434

3535
func readServices() ([]*requests.Function, error) {
3636
var list []*requests.Function
37-
for _, v := range functions{
37+
for _, v := range functions {
3838
list = append(list, v)
3939
}
4040

@@ -43,12 +43,12 @@ func readServices() ([]*requests.Function, error) {
4343

4444
func createToRequest(request requests.CreateFunctionRequest) *requests.Function {
4545
return &requests.Function{
46-
Name: request.Service,
47-
Annotations: request.Annotations,
48-
EnvProcess: request.EnvProcess,
49-
Image: request.Image,
50-
Labels: request.Labels,
46+
Name: request.Service,
47+
Annotations: request.Annotations,
48+
EnvProcess: request.EnvProcess,
49+
Image: request.Image,
50+
Labels: request.Labels,
5151
AvailableReplicas: 1,
52-
Replicas: 1,
52+
Replicas: 1,
5353
}
54-
}
54+
}

handlers/replicas.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ package handlers
55

66
import (
77
"encoding/json"
8-
"github.com/openfaas/faas/gateway/requests"
98
"net/http"
109

10+
"github.com/openfaas/faas/gateway/requests"
11+
1112
"github.com/gorilla/mux"
1213
log "github.com/sirupsen/logrus"
1314
)

handlers/update.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package handlers
22

33
import (
44
"encoding/json"
5-
log "github.com/sirupsen/logrus"
65
"io/ioutil"
76
"net/http"
87

8+
log "github.com/sirupsen/logrus"
9+
910
"github.com/openfaas/faas/gateway/requests"
1011
)
1112

@@ -33,4 +34,4 @@ func MakeUpdateHandler() http.HandlerFunc {
3334

3435
functions[request.Service] = createToRequest(request)
3536
}
36-
}
37+
}

main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package main
22

33
import (
44
"fmt"
5-
"github.com/openfaas/faas-federation/handlers"
6-
"github.com/openfaas/faas-federation/routing"
7-
"github.com/openfaas/faas-federation/types"
8-
"github.com/openfaas/faas-federation/version"
5+
"github.com/ewilde/faas-federation/handlers"
6+
"github.com/ewilde/faas-federation/routing"
7+
"github.com/ewilde/faas-federation/types"
8+
"github.com/ewilde/faas-federation/version"
99
"github.com/openfaas/faas-provider"
1010
"github.com/openfaas/faas-provider/proxy"
1111
"os"

0 commit comments

Comments
 (0)