Skip to content
Open
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
6 changes: 3 additions & 3 deletions gateway/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func (gw *Gateway) setupGlobals() {
time.Duration(gwConfig.DnsCache.CheckInterval)*time.Second)
}

if gwConfig.EnableAnalytics && gwConfig.Storage.Type != "redis" {
if gwConfig.EnableAnalytics && gwConfig.Storage.Type != "redis" && gwConfig.Storage.Type != "local" {
mainLog.Fatal("Analytics requires Redis Storage backend, please enable Redis in the tyk.conf file.")
}

Expand Down Expand Up @@ -1248,8 +1248,8 @@ func (gw *Gateway) initialiseSystem() error {
}
}

if gwConfig.Storage.Type != "redis" {
mainLog.Fatal("Redis connection details not set, please ensure that the storage type is set to Redis and that the connection parameters are correct.")
if gwConfig.Storage.Type != "redis" && gwConfig.Storage.Type != "local" {
mainLog.Fatal("storage connection details not set, please ensure that the storage type is set to Redis and that the connection parameters are correct.")
}

// suply rpc client globals to join it main loging and instrumentation sub systems
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ require (
nhooyr.io/websocket v1.8.10 // indirect
)

// replace github.com/TykTechnologies/storage => ../storage

//replace github.com/TykTechnologies/graphql-go-tools => ../graphql-go-tools

//replace github.com/TykTechnologies/graphql-go-tools/v2 => ../graphql-go-tools/v2
5 changes: 5 additions & 0 deletions storage/connection_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ func NewConnector(connType string, conf config.Config) (model.Connector, error)
}
log.Debug("Creating new " + connType + " Storage connection")

// we can ignore everything for a local connector
if cfg.Type == "local" {
return connector.NewConnector(model.LocalType)
}

// poolSize applies per cluster node and not for the whole cluster.
poolSize := 500
if cfg.MaxActive > 0 {
Expand Down