diff --git a/go/Makefile b/go/Makefile index bd3e101b7b..7af6393921 100644 --- a/go/Makefile +++ b/go/Makefile @@ -23,6 +23,7 @@ generate-protobuf: lint: go vet ./... staticcheck ./... + if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then return 1; fi unit-test-report: mkdir -p reports diff --git a/go/api/config.go b/go/api/config.go new file mode 100644 index 0000000000..907b10c767 --- /dev/null +++ b/go/api/config.go @@ -0,0 +1,257 @@ +package api + +import "github.com/aws/glide-for-redis/go/glide/protobuf" + +// NodeAddress represents the host address and port of a node in the cluster. +type NodeAddress struct { + Host string + Port uint32 +} + +// RedisCredentials represents the credentials for connecting to a Redis server. +type RedisCredentials struct { + // The username that will be used for authenticating connections to the Redis servers. If not + // supplied, "default" will be used. + Username string + // The password that will be used for authenticating connections to the Redis servers. + Password string +} + +// ReadFrom represents the client's read from strategy. +type ReadFrom int + +const ( + // Always get from primary, in order to get the freshest data. + PRIMARY ReadFrom = 0 + // Spread the requests between all replicas in a round robin manner. If no replica is available, + // route the requests to the primary. + PREFER_REPLICA ReadFrom = 1 +) + +type baseClientConfiguration struct { + addresses []NodeAddress + useTLS bool + credentials *RedisCredentials + readFrom ReadFrom + requestTimeout int32 +} + +func (config *baseClientConfiguration) toProtobufConnRequest() *protobuf.ConnectionRequest { + request := protobuf.ConnectionRequest{} + for _, address := range config.addresses { + nodeAddress := &protobuf.NodeAddress{ + Host: address.Host, + Port: address.Port, + } + request.Addresses = append(request.Addresses, nodeAddress) + } + + if config.useTLS { + request.TlsMode = protobuf.TlsMode_SecureTls + } else { + request.TlsMode = protobuf.TlsMode_NoTls + } + + if config.credentials != nil { + authInfo := protobuf.AuthenticationInfo{} + if config.credentials.Username != "" { + authInfo.Username = config.credentials.Username + } + authInfo.Password = config.credentials.Password + request.AuthenticationInfo = &authInfo + } + + request.ReadFrom = mapReadFrom(config.readFrom) + if config.requestTimeout > 0 { + request.RequestTimeout = uint32(config.requestTimeout) + } + + return &request +} + +func mapReadFrom(readFrom ReadFrom) protobuf.ReadFrom { + if readFrom == PREFER_REPLICA { + return protobuf.ReadFrom_PreferReplica + } + + return protobuf.ReadFrom_Primary +} + +// BackoffStrategy represents the strategy used to determine how and when to reconnect, in case of +// connection failures. The time between attempts grows exponentially, to the formula +// rand(0 ... factor * (exponentBase ^ N)), where N is the number of failed attempts. +// +// Once the maximum value is reached, that will remain the time between retry attempts until a +// reconnect attempt is successful. The client will attempt to reconnect indefinitely. +type BackoffStrategy struct { + // Number of retry attempts that the client should perform when disconnected from the server, + // where the time between retries increases. Once the retries have reached the maximum value, + // the time between retries will remain constant until a reconnect attempt is successful. + NumOfRetries uint32 + // The multiplier that will be applied to the waiting time between each retry. + Factor uint32 + // The exponent base configured for the strategy. + ExponentBase uint32 +} + +// RedisClientConfiguration represents the configuration settings for a Standalone Redis client. +// baseClientConfiguration is an embedded struct that contains shared settings for standalone and +// cluster clients. +type RedisClientConfiguration struct { + baseClientConfiguration + reconnectStrategy *BackoffStrategy + databaseId int32 +} + +// NewRedisClientConfiguration returns a [RedisClientConfiguration] with default configuration +// settings. For further configuration, use the [RedisClientConfiguration] With* methods. +func NewRedisClientConfiguration() *RedisClientConfiguration { + return &RedisClientConfiguration{ + baseClientConfiguration: baseClientConfiguration{readFrom: PRIMARY}, + } +} + +func (config *RedisClientConfiguration) toProtobufConnRequest() *protobuf.ConnectionRequest { + request := config.baseClientConfiguration.toProtobufConnRequest() + request.ClusterModeEnabled = false + if config.reconnectStrategy != nil { + request.ConnectionRetryStrategy = &protobuf.ConnectionRetryStrategy{ + NumberOfRetries: config.reconnectStrategy.NumOfRetries, + Factor: config.reconnectStrategy.Factor, + ExponentBase: config.reconnectStrategy.ExponentBase, + } + } + + if config.databaseId >= 0 { + request.DatabaseId = uint32(config.databaseId) + } + + return request +} + +// WithAddress adds an address for a known node in the cluster to this configuration's list of +// addresses. WithAddress can be called multiple times to add multiple addresses to the list. If the +// server is in cluster mode the list can be partial, as the client will attempt to map out the +// cluster and find all nodes. If the server is in standalone mode, only nodes whose addresses were +// provided will be used by the client. For example: +// +// config := NewRedisClientConfiguration(). +// WithAddress(&NodeAddress{ +// Host: "sample-address-0001.use1.cache.amazonaws.com", Port: 6379}). +// WithAddress(&NodeAddress{ +// Host: "sample-address-0002.use1.cache.amazonaws.com", Port: 6379}) +func (config *RedisClientConfiguration) WithAddress(address *NodeAddress) *RedisClientConfiguration { + config.addresses = append(config.addresses, *address) + return config +} + +// WithUseTLS configures the TLS settings for this configuration. Set to true if communication with +// the cluster should use Transport Level Security. This setting should match the TLS configuration +// of the server/cluster, otherwise the connection attempt will fail. +func (config *RedisClientConfiguration) WithUseTLS(useTLS bool) *RedisClientConfiguration { + config.useTLS = useTLS + return config +} + +// WithCredentials sets the credentials for the authentication process. If none are set, the client +// will not authenticate itself with the server. +func (config *RedisClientConfiguration) WithCredentials(credentials *RedisCredentials) *RedisClientConfiguration { + config.credentials = credentials + return config +} + +// WithReadFrom sets the client's [ReadFrom] strategy. If not set, [PRIMARY] will be used. +func (config *RedisClientConfiguration) WithReadFrom(readFrom ReadFrom) *RedisClientConfiguration { + config.readFrom = readFrom + return config +} + +// WithRequestTimeout sets the duration in milliseconds that the client should wait for a request to +// complete. This duration encompasses sending the request, awaiting for a response from the server, +// and any required reconnections or retries. If the specified timeout is exceeded for a pending +// request, it will result in a timeout error. If not set, a default value will be used. +func (config *RedisClientConfiguration) WithRequestTimeout(requestTimeout uint32) *RedisClientConfiguration { + config.requestTimeout = int32(requestTimeout) + return config +} + +// WithReconnectStrategy sets the [BackoffStrategy] used to determine how and when to reconnect, in +// case of connection failures. If not set, a default backoff strategy will be used. +func (config *RedisClientConfiguration) WithReconnectStrategy(strategy *BackoffStrategy) *RedisClientConfiguration { + config.reconnectStrategy = strategy + return config +} + +// WithDatabaseId sets the index of the logical database to connect to. +func (config *RedisClientConfiguration) WithDatabaseId(id uint32) *RedisClientConfiguration { + config.databaseId = int32(id) + return config +} + +// RedisClusterClientConfiguration represents the configuration settings for a Cluster Redis client. +// Notes: Currently, the reconnection strategy in cluster mode is not configurable, and exponential +// backoff with fixed values is used. +type RedisClusterClientConfiguration struct { + baseClientConfiguration +} + +// NewRedisClusterClientConfiguration returns a [RedisClientConfiguration] with default +// configuration settings. For further configuration, use the [RedisClientConfiguration] With* +// methods. +func NewRedisClusterClientConfiguration() *RedisClusterClientConfiguration { + return &RedisClusterClientConfiguration{ + baseClientConfiguration: baseClientConfiguration{}, + } +} + +func (config *RedisClusterClientConfiguration) toProtobufConnRequest() *protobuf.ConnectionRequest { + request := config.baseClientConfiguration.toProtobufConnRequest() + request.ClusterModeEnabled = true + return request +} + +// WithAddress adds an address for a known node in the cluster to this configuration's list of +// addresses. WithAddress can be called multiple times to add multiple addresses to the list. If the +// server is in cluster mode the list can be partial, as the client will attempt to map out the +// cluster and find all nodes. If the server is in standalone mode, only nodes whose addresses were +// provided will be used by the client. For example: +// +// config := NewRedisClusterClientConfiguration(). +// WithAddress(&NodeAddress{ +// Host: "sample-address-0001.use1.cache.amazonaws.com", Port: 6379}). +// WithAddress(&NodeAddress{ +// Host: "sample-address-0002.use1.cache.amazonaws.com", Port: 6379}) +func (config *RedisClusterClientConfiguration) WithAddress(address NodeAddress) *RedisClusterClientConfiguration { + config.addresses = append(config.addresses, address) + return config +} + +// WithUseTLS configures the TLS settings for this configuration. Set to true if communication with +// the cluster should use Transport Level Security. This setting should match the TLS configuration +// of the server/cluster, otherwise the connection attempt will fail. +func (config *RedisClusterClientConfiguration) WithUseTLS(useTLS bool) *RedisClusterClientConfiguration { + config.useTLS = useTLS + return config +} + +// WithCredentials sets the credentials for the authentication process. If none are set, the client +// will not authenticate itself with the server. +func (config *RedisClusterClientConfiguration) WithCredentials(credentials *RedisCredentials) *RedisClusterClientConfiguration { + config.credentials = credentials + return config +} + +// WithReadFrom sets the client's [ReadFrom] strategy. If not set, [PRIMARY] will be used. +func (config *RedisClusterClientConfiguration) WithReadFrom(readFrom ReadFrom) *RedisClusterClientConfiguration { + config.readFrom = readFrom + return config +} + +// WithRequestTimeout sets the duration in milliseconds that the client should wait for a request to +// complete. This duration encompasses sending the request, awaiting for a response from the server, +// and any required reconnections or retries. If the specified timeout is exceeded for a pending +// request, it will result in a timeout error. If not set, a default value will be used. +func (config *RedisClusterClientConfiguration) WithRequestTimeout(requestTimeout uint32) *RedisClusterClientConfiguration { + config.requestTimeout = int32(requestTimeout) + return config +} diff --git a/go/api/config_test.go b/go/api/config_test.go new file mode 100644 index 0000000000..d5e1df09c7 --- /dev/null +++ b/go/api/config_test.go @@ -0,0 +1,78 @@ +package api + +import ( + "github.com/aws/glide-for-redis/go/glide/protobuf" + "github.com/stretchr/testify/assert" + "testing" +) + +func TestConnectionRequestProtobufGeneration_defaultStandaloneConfig(t *testing.T) { + config := NewRedisClientConfiguration() + expected := &protobuf.ConnectionRequest{ + TlsMode: protobuf.TlsMode_NoTls, + ClusterModeEnabled: false, + ReadFrom: protobuf.ReadFrom_Primary, + } + + result := config.toProtobufConnRequest() + + assert.Equal(t, expected, result) +} + +func TestConnectionRequestProtobufGeneration_defaultClusterConfig(t *testing.T) { + config := NewRedisClusterClientConfiguration() + expected := &protobuf.ConnectionRequest{ + TlsMode: protobuf.TlsMode_NoTls, + ClusterModeEnabled: true, + ReadFrom: protobuf.ReadFrom_Primary, + } + + result := config.toProtobufConnRequest() + + assert.Equal(t, expected, result) +} + +func TestConnectionRequestProtobufGeneration_allFieldsSet(t *testing.T) { + hosts := []string{"host1", "host2"} + ports := []uint32{1234, 5678} + username := "username" + password := "password" + var timeout uint32 = 3 + var retries, factor, base uint32 = 5, 10, 50 + var databaseId uint32 = 1 + + config := NewRedisClientConfiguration(). + WithUseTLS(true). + WithReadFrom(PREFER_REPLICA). + WithCredentials(&RedisCredentials{username, password}). + WithRequestTimeout(timeout). + WithReconnectStrategy(&BackoffStrategy{retries, factor, base}). + WithDatabaseId(databaseId) + + expected := &protobuf.ConnectionRequest{ + TlsMode: protobuf.TlsMode_SecureTls, + ReadFrom: protobuf.ReadFrom_PreferReplica, + ClusterModeEnabled: false, + AuthenticationInfo: &protobuf.AuthenticationInfo{Username: username, Password: password}, + RequestTimeout: timeout, + ConnectionRetryStrategy: &protobuf.ConnectionRetryStrategy{ + NumberOfRetries: retries, + Factor: factor, + ExponentBase: base, + }, + DatabaseId: databaseId, + } + + assert.Equal(t, len(hosts), len(ports)) + for i := 0; i < len(hosts); i++ { + config.WithAddress(&NodeAddress{hosts[i], ports[i]}) + expected.Addresses = append( + expected.Addresses, + &protobuf.NodeAddress{Host: hosts[i], Port: ports[i]}, + ) + } + + result := config.toProtobufConnRequest() + + assert.Equal(t, expected, result) +} diff --git a/go/glide/glide.go b/go/glide/glide.go deleted file mode 100644 index 767864d035..0000000000 --- a/go/glide/glide.go +++ /dev/null @@ -1 +0,0 @@ -package glide diff --git a/go/go.mod b/go/go.mod index e5c99d1988..a1b5d52c7e 100644 --- a/go/go.mod +++ b/go/go.mod @@ -3,6 +3,7 @@ module github.com/aws/glide-for-redis/go/glide go 1.18 require ( + github.com/stretchr/testify v1.8.4 github.com/vakenbolt/go-test-report v0.9.3 google.golang.org/protobuf v1.32.0 honnef.co/go/tools v0.3.3 @@ -10,12 +11,16 @@ require ( require ( github.com/BurntSushi/toml v1.2.1 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/tools v0.12.1-0.20230825192346-2191a27a6dc5 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/tools v0.17.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go/go.sum b/go/go.sum index 4ccef17d5a..5a2cebee13 100644 --- a/go/go.sum +++ b/go/go.sum @@ -34,6 +34,7 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -61,7 +62,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -106,8 +108,12 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -127,6 +133,7 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -143,6 +150,9 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -167,8 +177,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/vakenbolt/go-test-report v0.9.3 h1:KPJIZJhr3CKdk82+6KD/LnLF89lvW8aklyRqOjlPJRQ= @@ -205,8 +216,8 @@ golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -230,7 +241,6 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -244,8 +254,6 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -268,10 +276,9 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.12.1-0.20230825192346-2191a27a6dc5 h1:Vk4mysSz+GqQK2eqgWbo4zEO89wkeAjJiFIr9bpqa8k= -golang.org/x/tools v0.12.1-0.20230825192346-2191a27a6dc5/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -297,6 +304,7 @@ google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7 google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= diff --git a/go/tests/glide_test.go b/go/tests/glide_test.go deleted file mode 100644 index 32103c6fc5..0000000000 --- a/go/tests/glide_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package tests - -import ( - "testing" -) - -// TODO: Replace this test with real tests when glide client implementation is started -func TestArbitraryLogic(t *testing.T) { - someVar := true - if !someVar { - t.Fatalf("Expected someVar to be true, but was false.") - } -}