diff --git a/Gopkg.lock b/Gopkg.lock index e368f22..208cef5 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -185,8 +185,8 @@ [[projects]] name = "github.com/hashicorp/consul" packages = ["api"] - revision = "5174058f0d2bda63fa5198ab96c33d9a909c58ed" - version = "v1.1.0" + revision = "39f93f011e591c842acc8053a7f5972aa6e592fd" + version = "v1.2.1" [[projects]] branch = "master" @@ -374,6 +374,12 @@ packages = ["."] revision = "2bca23e0e452137f789efbc8610126fd8b94f73b" +[[projects]] + branch = "master" + name = "github.com/mitchellh/mapstructure" + packages = ["."] + revision = "f15292f7a699fcc1a38a80977f80a046874ba8ac" + [[projects]] branch = "master" name = "github.com/mitchellh/reflectwalk" @@ -467,15 +473,14 @@ version = "v1.0.2" [[projects]] - branch = "fix-kube-plugin" name = "github.com/solo-io/gloo" packages = [ - "internal/control-plane/filewatcher", "pkg/api/types/v1", "pkg/backoff", "pkg/bootstrap", "pkg/bootstrap/configstorage", "pkg/bootstrap/flags", + "pkg/control-plane/filewatcher", "pkg/coreplugins/common", "pkg/coreplugins/static", "pkg/endpointdiscovery", @@ -497,10 +502,11 @@ "pkg/storage/crud", "pkg/storage/dependencies", "pkg/storage/file", + "pkg/utils/kube", "test/helpers", "test/helpers/local" ] - revision = "d6f228a5dc825fb5a455f8871d3dcc044bfb11d9" + revision = "4f06039f2a3cf4ae684de8e854c5eefb6448177a" [[projects]] name = "github.com/solo-io/glooctl" @@ -857,6 +863,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "e723a04faa066d643e195e3a1a46a207cdabfc8cf972582b5af25bd7df01eb84" + inputs-digest = "6ca1505fc6c92c39a50dc422c603353cd5806e5ef736e4b86d613a6c119f35b9" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index cdfbe01..d840cf9 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -32,6 +32,10 @@ name = "github.com/Azure/go-autorest" revision = "e14a70c556c8e0db173358d1a903dca345a8e75e" +[[constraint]] + name = "github.com/solo-io/gloo" + revision = "4f06039f2a3cf4ae684de8e854c5eefb6448177a" + [[constraint]] name = "github.com/onsi/ginkgo" version = "1.5.0" diff --git a/pkg/core/core_test.go b/pkg/core/core_test.go index 5084de2..89875bd 100644 --- a/pkg/core/core_test.go +++ b/pkg/core/core_test.go @@ -19,6 +19,7 @@ import ( "github.com/solo-io/qloo/pkg/bootstrap" . "github.com/solo-io/qloo/pkg/core" "github.com/solo-io/qloo/test" + "github.com/gogo/protobuf/types" ) var qlooPort int @@ -116,16 +117,16 @@ func eventuallyQueryShouldRespond(queryString, expectedString string) { }, time.Second*45).Should(ContainSubstring(expectedString)) } -func ptr(str string) *string { - return &str +func ptr(str string) *types.StringValue { + return &types.StringValue{Value: str} } func starWarsUpstream() *gloov1.Upstream { return &gloov1.Upstream{ Name: "starwars-rest", Type: static.UpstreamTypeService, - Spec: static.EncodeUpstreamSpec(static.UpstreamSpec{ - Hosts: []static.Host{ + Spec: static.EncodeUpstreamSpec(&static.UpstreamSpec{ + Hosts: []*static.Host{ { Addr: "localhost", Port: starWarsPort, @@ -138,16 +139,16 @@ func starWarsUpstream() *gloov1.Upstream { Functions: []*gloov1.Function{ { Name: "GetHero", - Spec: rest.EncodeFunctionSpec(rest.Template{ - Header: map[string]string{":method": "GET"}, + Spec: rest.EncodeFunctionSpec(rest.TransformationSpec{ + Headers: map[string]string{":method": "GET"}, Path: "/api/hero", }), }, { Name: "GetCharacter", - Spec: rest.EncodeFunctionSpec(rest.Template{ + Spec: rest.EncodeFunctionSpec(rest.TransformationSpec{ Body: ptr(""), - Header: map[string]string{ + Headers: map[string]string{ "x-id": "{{id}}", ":method": "GET", }, @@ -156,8 +157,8 @@ func starWarsUpstream() *gloov1.Upstream { }, { Name: "GetCharacters", - Spec: rest.EncodeFunctionSpec(rest.Template{ - Header: map[string]string{ + Spec: rest.EncodeFunctionSpec(rest.TransformationSpec{ + Headers: map[string]string{ ":method": "POST", }, Path: "/api/characters",