Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bobgroup-go-utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bob Public Utils
bobgroup-go-utils
Compare revisions
c6a6c370dafaaef33f793b85b2680335793d7460 to b40201d3d0e55e8244cc9a33480886b7e3f74220
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
bob-public-utils/bobgroup-go-utils
Select target project
No results found
b40201d3d0e55e8244cc9a33480886b7e3f74220
Select Git revision
Branches
main
Tags
v1.0.0
v1.1.0
v1.1.1
v1.1.2
v1.1.3
v1.1.4
v1.1.5
v1.1.6
v1.1.7
v1.1.8
v1.1.9
v1.10.0
v1.100.0
v1.101.0
v1.102.0
v1.103.0
v1.104.0
v1.105.0
v1.106.0
v1.107.0
v1.108.0
v1.109.0
v1.11.0
v1.110.0
v1.111.0
v1.112.0
v1.113.0
v1.114.0
v1.115.0
v1.116.0
v1.117.0
v1.118.0
v1.119.0
v1.12.0
v1.120.0
v1.121.0
v1.122.0
v1.123.0
v1.124.0
v1.125.0
v1.126.0
v1.127.0
v1.128.0
v1.129.0
v1.13.0
v1.130.0
v1.131.0
v1.132.0
v1.133.0
v1.134.0
v1.135.0
v1.136.0
v1.137.0
v1.138.0
v1.139.0
v1.14.0
v1.140.0
v1.141.0
v1.142.0
v1.143.0
v1.144.0
v1.145.0
v1.146.0
v1.147.0
v1.148.0
v1.149.0
v1.15.0
v1.150.0
v1.151.0
v1.152.0
v1.153.0
v1.154.0
v1.155.0
v1.156.0
v1.157.0
v1.158.0
v1.159.0
v1.16.0
v1.160.0
v1.161.0
v1.162.0
v1.163.0
v1.164.0
v1.165.0
v1.166.0
v1.167.0
v1.168.0
v1.169.0
v1.17.0
v1.170.0
v1.171.0
v1.172.0
v1.173.0
v1.174.0
v1.175.0
v1.176.0
v1.177.0
v1.178.0
v1.179.0
v1.18.0
101 results
Swap
Target
bob-public-utils/bobgroup-go-utils
Select target project
bob-public-utils/bobgroup-go-utils
1 result
c6a6c370dafaaef33f793b85b2680335793d7460
Select Git revision
Branches
main
Tags
v1.0.0
v1.1.0
v1.1.1
v1.1.2
v1.1.3
v1.1.4
v1.1.5
v1.1.6
v1.1.7
v1.1.8
v1.1.9
v1.10.0
v1.100.0
v1.101.0
v1.102.0
v1.103.0
v1.104.0
v1.105.0
v1.106.0
v1.107.0
v1.108.0
v1.109.0
v1.11.0
v1.110.0
v1.111.0
v1.112.0
v1.113.0
v1.114.0
v1.115.0
v1.116.0
v1.117.0
v1.118.0
v1.119.0
v1.12.0
v1.120.0
v1.121.0
v1.122.0
v1.123.0
v1.124.0
v1.125.0
v1.126.0
v1.127.0
v1.128.0
v1.129.0
v1.13.0
v1.130.0
v1.131.0
v1.132.0
v1.133.0
v1.134.0
v1.135.0
v1.136.0
v1.137.0
v1.138.0
v1.139.0
v1.14.0
v1.140.0
v1.141.0
v1.142.0
v1.143.0
v1.144.0
v1.145.0
v1.146.0
v1.147.0
v1.148.0
v1.149.0
v1.15.0
v1.150.0
v1.151.0
v1.152.0
v1.153.0
v1.154.0
v1.155.0
v1.156.0
v1.157.0
v1.158.0
v1.159.0
v1.16.0
v1.160.0
v1.161.0
v1.162.0
v1.163.0
v1.164.0
v1.165.0
v1.166.0
v1.167.0
v1.168.0
v1.169.0
v1.17.0
v1.170.0
v1.171.0
v1.172.0
v1.173.0
v1.174.0
v1.175.0
v1.176.0
v1.177.0
v1.178.0
v1.179.0
v1.18.0
101 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
queues/sqs_producer/producer.go
+0
-6
0 additions, 6 deletions
queues/sqs_producer/producer.go
search/document_store.go
+0
-7
0 additions, 7 deletions
search/document_store.go
search/time_series.go
+0
-6
0 additions, 6 deletions
search/time_series.go
service/context.go
+0
-13
0 additions, 13 deletions
service/context.go
with
0 additions
and
32 deletions
queues/sqs_producer/producer.go
View file @
b40201d3
...
...
@@ -11,7 +11,6 @@ import (
"github.com/aws/aws-sdk-go/service/sqs"
"gitlab.com/uafrica/go-utils/errors"
"gitlab.com/uafrica/go-utils/logger"
"gitlab.com/uafrica/go-utils/logs"
"gitlab.com/uafrica/go-utils/queues"
)
...
...
@@ -95,11 +94,6 @@ type QueueProducer struct {
}
func
(
m
*
QueueProducer
)
Send
(
event
queues
.
Event
)
(
string
,
error
)
{
startTime
:=
time
.
Now
()
defer
func
()
{
logs
.
LogSQSSent
(
startTime
,
event
.
QueueName
,
event
.
TypeName
,
event
.
BodyJSON
)
}()
//add params as message attributes
msgAttrs
:=
make
(
map
[
string
]
*
sqs
.
MessageAttributeValue
)
for
key
,
val
:=
range
event
.
ParamValues
{
...
...
This diff is collapsed.
Click to expand it.
search/document_store.go
View file @
b40201d3
...
...
@@ -8,12 +8,10 @@ import (
"net/http"
"reflect"
"strings"
"time"
opensearchapi
"github.com/opensearch-project/opensearch-go/opensearchapi"
"gitlab.com/uafrica/go-utils/errors"
"gitlab.com/uafrica/go-utils/logger"
"gitlab.com/uafrica/go-utils/logs"
"gitlab.com/uafrica/go-utils/reflection"
)
...
...
@@ -204,11 +202,6 @@ func (ds *documentStore) Search(query Query, limit int64) (ids []string, totalCo
Body
:
bytes
.
NewReader
(
jsonBody
),
}
startTime
:=
time
.
Now
()
defer
func
()
{
logs
.
LogSearch
(
startTime
,
ds
.
name
,
string
(
jsonBody
))
}()
searchResponse
,
err
:=
search
.
Do
(
context
.
Background
(),
ds
.
w
.
client
)
if
err
!=
nil
{
err
=
errors
.
Wrapf
(
err
,
"failed to search documents"
)
...
...
This diff is collapsed.
Click to expand it.
search/time_series.go
View file @
b40201d3
...
...
@@ -13,7 +13,6 @@ import (
opensearchapi
"github.com/opensearch-project/opensearch-go/opensearchapi"
"gitlab.com/uafrica/go-utils/errors"
"gitlab.com/uafrica/go-utils/logger"
"gitlab.com/uafrica/go-utils/logs"
"gitlab.com/uafrica/go-utils/reflection"
)
...
...
@@ -392,11 +391,6 @@ func (ts *timeSeries) Search(query Query, limit int64) (docs interface{}, totalC
Body
:
bytes
.
NewReader
(
jsonBody
),
}
startTime
:=
time
.
Now
()
defer
func
()
{
logs
.
LogSearch
(
startTime
,
ts
.
name
+
"-*"
,
string
(
jsonBody
))
}()
searchResponse
,
err
:=
search
.
Do
(
context
.
Background
(),
ts
.
w
.
client
)
if
err
!=
nil
{
err
=
errors
.
Wrapf
(
err
,
"failed to search documents"
)
...
...
This diff is collapsed.
Click to expand it.
service/context.go
View file @
b40201d3
...
...
@@ -9,7 +9,6 @@ import (
"gitlab.com/uafrica/go-utils/audit"
"gitlab.com/uafrica/go-utils/errors"
"gitlab.com/uafrica/go-utils/logger"
"gitlab.com/uafrica/go-utils/logs"
"gitlab.com/uafrica/go-utils/queues"
"gitlab.com/uafrica/go-utils/string_utils"
)
...
...
@@ -54,10 +53,6 @@ type Context interface {
//write a data change audit event
AuditChange
(
eventType
string
,
orgValue
,
newValue
interface
{})
//Sleep() does a time.Sleep and record it in log actions so that we can account for the time spent sleeping
//vs e.g. time waiting for outgoing API calls or db queries
Sleep
(
dur
time
.
Duration
)
}
//values: are added to context and logger
...
...
@@ -233,11 +228,3 @@ func (ctx *serviceContext) AuditChange(eventType string, orgValue, newValue inte
return
}
}
func
(
ctx
*
serviceContext
)
Sleep
(
dur
time
.
Duration
)
{
if
dur
>
0
{
startTime
:=
time
.
Now
()
time
.
Sleep
(
dur
)
logs
.
LogSleep
(
startTime
)
}
}
This diff is collapsed.
Click to expand it.
Prev
1
2
Next