Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ai-api-mgr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
ai-api-mgr
Commits
6f07b90c
Commit
6f07b90c
authored
Feb 26, 2024
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add cache package
parent
34bd4511
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
135 deletions
+10
-135
go.mod
go.mod
+6
-14
go.sum
go.sum
+0
-117
main.go
main.go
+4
-4
No files found.
go.mod
View file @
6f07b90c
...
...
@@ -4,23 +4,25 @@ go 1.21.7
replace github.com/odysseus/odysseus-protocol => ../odysseus-protocol
replace github.com/odysseus/payment => ../payment
replace github.com/odysseus/cache => ../cache
//replace github.com/odysseus/payment => ../payment
require (
github.com/IBM/sarama v1.42.1
github.com/gofiber/contrib/swagger v1.1.1
github.com/gofiber/fiber/v2 v2.52.0
github.com/gogo/protobuf v1.3.2
github.com/odysseus/odysseus-protocol v0.0.0-00010101000000-000000000000
github.com/odysseus/payment v0.0.0-00010101000000-000000000000
//
github.com/odysseus/payment v0.0.0-00010101000000-000000000000
github.com/questdb/go-questdb-client/v2 v2.0.0
github.com/swaggo/swag v1.16.3
)
require github.com/odysseus/cache v0.0.0-00010101000000-000000000000
require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/astaxie/beego v1.12.3 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
...
...
@@ -28,16 +30,10 @@ require (
github.com/eapache/go-resiliency v1.4.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/errors v0.20.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/loads v0.21.2 // indirect
github.com/go-openapi/runtime v0.26.0 // indirect
github.com/go-openapi/spec v0.20.8 // indirect
github.com/go-openapi/strfmt v0.21.7 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/validate v0.22.1 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/gomodule/redigo v2.0.0+incompatible // indirect
...
...
@@ -57,8 +53,6 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
...
...
@@ -69,12 +63,10 @@ require (
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.51.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
go.mongodb.org/mongo-driver v1.11.3 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/tools v0.14.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
go.sum
View file @
6f07b90c
This diff is collapsed.
Click to expand it.
main.go
View file @
6f07b90c
...
...
@@ -23,8 +23,8 @@ import (
pbUpstream
"github.com/odysseus/odysseus-protocol/gen/proto/go/base/v1"
qdb
"github.com/questdb/go-questdb-client/v2"
"github.com/odysseus/
payment
/cachedata"
"github.com/odysseus/
payment
/model"
"github.com/odysseus/
cache
/cachedata"
"github.com/odysseus/
cache
/model"
)
var
(
...
...
@@ -586,7 +586,7 @@ func ApiAndJWT(c *fiber.Ctx) error {
slog
.
Debug
(
"ApiAndJWT"
,
"path"
,
c
.
Route
()
.
Path
)
reqHeaders
:=
c
.
GetReqHeaders
()
return
c
.
SendString
(
reqHeaders
[
"Task-Id"
][
0
])
//
return c.SendString(reqHeaders["Task-Id"][0])
routePath
:=
c
.
Route
()
.
Path
routePathWithoutStar
:=
strings
.
TrimSuffix
(
routePath
,
"/*"
)
...
...
@@ -688,7 +688,7 @@ func ApiAndJWT(c *fiber.Ctx) error {
//fmt.Println("asyncMode-----------", asyncMode)
if
asyncMode
{
time
.
Sleep
(
10
*
time
.
Second
)
//
time.Sleep(10 * time.Second)
m
:=
make
([]
byte
,
1024
*
1024
)
return
c
.
SendString
(
string
(
m
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment