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

Implements valkey service #71

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
5 changes: 5 additions & 0 deletions TESTING_dockercompose.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ docker run --rm --net internal-services-test_default jwilder/dockerize dockerize
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://mongo-4:27017 -timeout 1m
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://redis-6:6379 -timeout 1m
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://redis-7:6379 -timeout 1m
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://valkey-8:6379 -timeout 1m
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://solr-8:8983 -timeout 1m
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://solr-9:8983 -timeout 1m

Expand Down Expand Up @@ -74,6 +75,10 @@ docker compose exec -T commons sh -c "curl -kL http://go-web:3000/redis?service=
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/redis?service=redis-7" | grep "SERVICE_HOST=redis-7"
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/redis?service=redis-7" | grep "LAGOON_TEST_VAR=internal-services-test"

# valkey-8 should be able to read/write data
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/valkey?service=valkey-8" | grep "SERVICE_HOST=valkey-8"
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/valkey?service=valkey-8" | grep "LAGOON_TEST_VAR=internal-services-test"

# solr-8 should be able to read/write data
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/solr?service=solr-8" | grep "SERVICE_HOST=solr-8"
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/solr?service=solr-8" | grep "LAGOON_TEST_VAR=internal-services-test"
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ services:
ports:
- '6379'

valkey-8:
image: uselagoon/valkey-8:latest
labels:
lagoon.type: valkey
ports:
- '6379'

solr-8:
image: uselagoon/solr-8:latest
labels:
Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package main
import (
"bytes"
"fmt"
"github.com/gorilla/mux"
"log"
"net/http"
"strings"
"time"

"github.com/gorilla/mux"
)

type funcType func() map[string]string
Expand All @@ -22,6 +23,7 @@ func main() {
r.HandleFunc("/opensearch", opensearchHandler)
r.HandleFunc("/storage", persistentStorageHandler)
r.HandleFunc("/mysql", mariadbHandler)
r.HandleFunc("/valkey", redisHandler)
r.HandleFunc("/", handleReq)
http.Handle("/", r)

Expand Down
Loading