Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redis #120

Merged
merged 1 commit into from
Sep 26, 2019
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To help adopting these practices, this repository also serves as a boilerplate f
- support for multiple server/daemon instances (using [oklog/run](https://github.com/oklog/run))
- messaging (using [ThreeDotsLabs/watermill](https://github.com/ThreeDotsLabs/watermill))
- MySQL database connection (using [go-sql-driver/mysql](https://github.com/go-sql-driver/mysql))
- Redis connection (using [gomodule/redigo](https://github.com/gomodule/redigo))
- ~~Redis connection (using [gomodule/redigo](https://github.com/gomodule/redigo))~~ removed due to lack of usage (see [#120](../../issues/120))


## First steps
Expand Down
14 changes: 0 additions & 14 deletions cmd/modern-go-application/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/sagikazarmark/modern-go-application/internal/platform/database"
"github.com/sagikazarmark/modern-go-application/internal/platform/log"
"github.com/sagikazarmark/modern-go-application/internal/platform/opencensus"
"github.com/sagikazarmark/modern-go-application/internal/platform/redis"
"github.com/sagikazarmark/modern-go-application/internal/platform/watermill"
)

Expand Down Expand Up @@ -63,9 +62,6 @@ type configuration struct {
// Database connection information
Database database.Config

// Redis configuration
Redis redis.Config

// Watermill configuration
Watermill struct {
RouterConfig watermill.RouterConfig
Expand Down Expand Up @@ -94,11 +90,6 @@ func (c configuration) Validate() error {
return err
}

// Uncomment to enable redis config validation
// if err := c.Redis.Validate(); err != nil {
// return err
// }

return nil
}

Expand Down Expand Up @@ -177,11 +168,6 @@ func configure(v *viper.Viper, p *pflag.FlagSet) {
"collation": "utf8mb4_general_ci",
})

// Redis configuration
_ = v.BindEnv("redis.host")
v.SetDefault("redis.port", 6379)
_ = v.BindEnv("redis.password")

// Watermill configuration
v.RegisterAlias("watermill.routerConfig.closeTimeout", "shutdownTimeout")
}
5 changes: 0 additions & 5 deletions config.toml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,3 @@ user = "root"
pass = ""
name = "app"
params = { collation = "utf8mb4_general_ci" }

[redis]
host = "127.0.0.1"
port = 6379
password = []
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ services:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: app

redis:
image: redis:5.0

dockerhost:
image: qoomon/docker-host:2.3.0
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ require (
github.com/go-kit/kit v0.9.0
github.com/go-sql-driver/mysql v1.4.1
github.com/golang/protobuf v1.3.2
github.com/gomodule/redigo v2.0.0+incompatible
github.com/goph/idgen v0.3.0
github.com/gorilla/mux v1.7.3
github.com/inconshreveable/mousetrap v1.0.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
Expand Down
37 changes: 0 additions & 37 deletions internal/platform/redis/config.go

This file was deleted.

39 changes: 0 additions & 39 deletions internal/platform/redis/config_test.go

This file was deleted.

49 changes: 0 additions & 49 deletions internal/platform/redis/pool.go

This file was deleted.