From 84c966d19aea8c97239975857b2b75f726cde5a7 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 26 Jan 2024 20:46:30 -0500 Subject: removed redis, updated pocketbase version --- main.go | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 4614a60..66250be 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,6 @@ import ( "os" "time" - "github.com/go-redis/redis/v8" "github.com/labstack/echo/v5" "github.com/lrstanley/girc" "github.com/pelletier/go-toml/v2" @@ -16,13 +15,8 @@ import ( "github.com/pocketbase/pocketbase/core" ) -var rdb *redis.Client - const ( - redisDialTimeout = 5 - redisReadTimeout = 10 - redisWriteTimetout = 10 - reconnectTime = 30 + reconnectTime = 30 ) type handlerWrapper struct { @@ -40,15 +34,12 @@ type SMS struct { } type TomlConfig struct { - IrcServer string - IrcPort int - IrcNick string - IrcSaslUser string - IrcSaslPass string - IrcChannel string - RedisAddress string - RedisPassword string - RedisDB int + IrcServer string + IrcPort int + IrcNick string + IrcSaslUser string + IrcSaslPass string + IrcChannel string } // curl -X 'POST' 'http://127.0.0.1:8090/sms' -H 'content-type: application/json; charset=utf-8' -d $'{"from":"1234567890","text":"Test"}' @@ -135,16 +126,6 @@ func main() { log.Println(appConfig) - rdb = redis.NewClient(&redis.Options{ - Addr: appConfig.RedisAddress, - Password: appConfig.RedisPassword, - DB: appConfig.RedisDB, - DialTimeout: redisDialTimeout, - ReadTimeout: redisReadTimeout, - WriteTimeout: redisWriteTimetout, - }) - defer rdb.Close() - app := pocketbase.New() ircChan := make(chan *girc.Client, 1) -- cgit v1.2.3