Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cache/wrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var (
Environment: strPtr("env"),
Excluded: &[]rest.Target{{Identifier: "exlc1"}, {Identifier: "exlc2"}},
Included: &[]rest.Target{{Identifier: "incl1"}, {Identifier: "incl2"}},
Rules: &[]rest.Clause{{Attribute: "attr", Id: "id", Negate: false, Op: "contains", Values: []string{"val1", "val2"}}},
Tags: &[]rest.Tag{{Name: "tagName", Value: strPtr("tagValue")}},
Rules: &[]rest.Clause{{Attribute: "attr", Id: strPtr("id"), Negate: false, Op: "contains", Values: []string{"val1", "val2"}}},
Tags: &[]rest.Tag{{Name: "tagName", Identifier: "tagValue"}},
Version: int64Ptr(2),
}

Expand All @@ -53,9 +53,9 @@ var (
Project: "proj",
Rules: &[]rest.ServingRule{
{
Clauses: []rest.Clause{{Attribute: "attr", Id: "id", Negate: false, Op: "contains", Values: []string{"val1", "val2"}}},
Clauses: []rest.Clause{{Attribute: "attr", Id: strPtr("id"), Negate: false, Op: "contains", Values: []string{"val1", "val2"}}},
Priority: 1,
RuleId: "ID",
RuleId: strPtr("ID"),
Serve: rest.Serve{
Distribution: nil,
Variation: strPtr("str"),
Expand All @@ -66,7 +66,7 @@ var (
VariationToTargetMap: &[]rest.VariationMap{
{
TargetSegments: &[]string{"segment1", "segment2", "segment3"},
Targets: &[]rest.TargetMap{{strPtr("target1"), "target1"}, {strPtr("target2"), "target2"}, {strPtr("target3"), "target3"}},
Targets: &[]rest.TargetMap{{"target1", "target1"}, {"target2", "target2"}, {"target3", "target3"}},
Variation: "var",
},
},
Expand Down
7 changes: 0 additions & 7 deletions cmd/example-sdk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"time"

harness "github.com/harness/ff-golang-server-sdk/client"
"github.com/harness/ff-golang-server-sdk/logger"

"github.com/harness/ff-golang-server-sdk/dto"
)
Expand All @@ -35,11 +34,6 @@ func init() {
}

func main() {
logger, err := logger.NewZapLogger(true)
if err != nil {
log.Fatal(err)
}

target := dto.NewTargetBuilder(targetIdentifier).
Name(targetIdentifier).
Build()
Expand All @@ -49,7 +43,6 @@ func main() {
harness.WithURL(baseURL),
harness.WithEventsURL(eventsURL),
harness.WithTarget(target),
harness.WithLogger(logger),
harness.WithPullInterval(1),
)
defer func() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/ff-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"

"github.com/fanout/go-gripcontrol"
"github.com/harness-community/go-gripcontrol"
"github.com/hashicorp/go-retryablehttp"

"cloud.google.com/go/profiler"
Expand Down
8 changes: 4 additions & 4 deletions config/local_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var (
Clauses: []rest.Clause{
{
Attribute: "age",
Id: "79f5bca0-17ca-42c2-8934-5cee840fe2e0",
Id: strPtr("79f5bca0-17ca-42c2-8934-5cee840fe2e0"),
Negate: false,
Op: "equal",
Values: []string{
Expand All @@ -52,7 +52,7 @@ var (
},
},
Priority: 1,
RuleId: "8756c207-abf8-4202-83fd-dedf5d27e2c2",
RuleId: strPtr("8756c207-abf8-4202-83fd-dedf5d27e2c2"),
Serve: rest.Serve{
Variation: strPtr("false"),
},
Expand All @@ -66,7 +66,7 @@ var (
},
Targets: &[]rest.TargetMap{
{
Identifier: strPtr("davej"),
Identifier: "davej",
Name: "Dave Johnston",
},
},
Expand Down Expand Up @@ -128,7 +128,7 @@ var (
Rules: &[]rest.Clause{
{
Attribute: "ip",
Id: "31c18ee7-8051-44cc-8507-b44580467ee5",
Id: strPtr("31c18ee7-8051-44cc-8507-b44580467ee5"),
Negate: false,
Op: "equal",
Values: []string{"2a00:23c5:b672:2401:158:f2a6:67a0:6a79"},
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ services:
- ./tests/e2e/certs:/certs
ports:
- 7000:${PORT:-7000}
depends_on:
- redis

redis:
image: "redis:latest"
Expand Down
22 changes: 12 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@ require (
github.com/alicebob/miniredis/v2 v2.30.4
github.com/avast/retry-go v3.0.0+incompatible
github.com/deepmap/oapi-codegen v1.11.0
github.com/fanout/go-gripcontrol v1.2.0
github.com/fanout/go-pubcontrol v1.2.0
github.com/go-kit/kit v0.12.0
github.com/go-redis/cache/v8 v8.4.4
github.com/go-redis/redis/v8 v8.11.4
github.com/golang-jwt/jwt/v4 v4.5.2
github.com/google/uuid v1.5.0
github.com/harness-community/go-gripcontrol v1.2.1
github.com/harness-community/go-pubcontrol v1.2.1
github.com/harness-community/sse/v3 v3.1.0
github.com/harness/ff-golang-server-sdk v0.1.20
github.com/harness/ff-golang-server-sdk v0.1.26
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/joho/godotenv v1.4.0
github.com/json-iterator/go v1.1.12
github.com/labstack/echo/v4 v4.11.4
github.com/labstack/echo-jwt/v4 v4.1.0
github.com/labstack/echo/v4 v4.13.4
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/prometheus/client_golang v1.11.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.10.0
go.uber.org/zap v1.19.1
gopkg.in/yaml.v2 v2.4.0
)
Expand All @@ -33,15 +34,16 @@ require (
cloud.google.com/go v0.110.10 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deepmap/oapi-codegen/v2 v2.1.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/getkin/kin-openapi v0.124.0 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/swag v0.22.8 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/pprof v0.0.0-20221103000818-d260c55eee4c // indirect
Expand All @@ -56,21 +58,21 @@ require (
github.com/klauspost/compress v1.16.7 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/oapi-codegen/runtime v1.1.1 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.30.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/vmihailenco/go-tinylfu v0.2.2 // indirect
Expand All @@ -82,12 +84,12 @@ require (
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.36.0 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.25.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/time v0.11.0 // indirect
google.golang.org/api v0.149.0 // indirect
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect
Expand Down
Loading