Skip to content

Commit 62128d4

Browse files
committed
fix[plugins]: update go-sdk and fix plugins compilation
1 parent 039290a commit 62128d4

File tree

44 files changed

+88
-86
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+88
-86
lines changed

agent-manager/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ require (
4444
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4545
github.com/modern-go/reflect2 v1.0.2 // indirect
4646
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
47-
github.com/threatwinds/go-sdk v1.1.0
47+
github.com/threatwinds/go-sdk v1.1.1
4848
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
4949
github.com/ugorji/go/codec v1.3.1 // indirect
5050
golang.org/x/arch v0.23.0 // indirect

agent-manager/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
8989
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
9090
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
9191
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
92-
github.com/threatwinds/go-sdk v1.1.0 h1:2BQmmb15e+7Wuu95+b6fe5XP3o14z5c64cwV61wQziA=
93-
github.com/threatwinds/go-sdk v1.1.0/go.mod h1:3bLB1+UmtcFfCqlMguCq69q0DeTueS0iq0r8a2yIZQA=
92+
github.com/threatwinds/go-sdk v1.1.1 h1:K1rtmjhYokGvj5z/o/wwn8gD6LvkgKfxv2MyMUezRUQ=
93+
github.com/threatwinds/go-sdk v1.1.1/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
9494
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
9595
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
9696
github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY=

agent/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/google/uuid v1.6.0
1010
github.com/kardianos/service v1.2.4
1111
github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068
12-
github.com/threatwinds/go-sdk v1.1.0
12+
github.com/threatwinds/go-sdk v1.1.1
1313
github.com/threatwinds/logger v1.2.3
1414
golang.org/x/sys v0.40.0
1515
google.golang.org/grpc v1.78.0

agent/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
119119
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
120120
github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068 h1:1B+EAUqxEyPByCfk55tB21DtR7WF7Q2w71g7+uVkvIg=
121121
github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068/go.mod h1:QRP5wJOf7gGMGL2fCAfmh/5CMZQspRxT5DqghaPRrjM=
122-
github.com/threatwinds/go-sdk v1.1.0 h1:2BQmmb15e+7Wuu95+b6fe5XP3o14z5c64cwV61wQziA=
123-
github.com/threatwinds/go-sdk v1.1.0/go.mod h1:3bLB1+UmtcFfCqlMguCq69q0DeTueS0iq0r8a2yIZQA=
122+
github.com/threatwinds/go-sdk v1.1.1 h1:K1rtmjhYokGvj5z/o/wwn8gD6LvkgKfxv2MyMUezRUQ=
123+
github.com/threatwinds/go-sdk v1.1.1/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
124124
github.com/threatwinds/logger v1.2.3 h1:V2SVAXzbq+/huCvIWOfqzMTH+WBHJxankyBgVG2hy1Y=
125125
github.com/threatwinds/logger v1.2.3/go.mod h1:N+bJKvF4FQNJZLfQpVYWpr6D8iEAFnAQfHYqH5iR1TI=
126126
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=

agent/updater/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.25.5
44

55
require (
66
github.com/kardianos/service v1.2.4
7-
github.com/threatwinds/go-sdk v1.1.0
7+
github.com/threatwinds/go-sdk v1.1.1
88
github.com/threatwinds/logger v1.2.3
99
gopkg.in/yaml.v3 v3.0.1
1010
)

agent/updater/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
7474
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
7575
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
7676
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
77-
github.com/threatwinds/go-sdk v1.1.0 h1:2BQmmb15e+7Wuu95+b6fe5XP3o14z5c64cwV61wQziA=
78-
github.com/threatwinds/go-sdk v1.1.0/go.mod h1:3bLB1+UmtcFfCqlMguCq69q0DeTueS0iq0r8a2yIZQA=
77+
github.com/threatwinds/go-sdk v1.1.1 h1:K1rtmjhYokGvj5z/o/wwn8gD6LvkgKfxv2MyMUezRUQ=
78+
github.com/threatwinds/go-sdk v1.1.1/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
7979
github.com/threatwinds/logger v1.2.3 h1:V2SVAXzbq+/huCvIWOfqzMTH+WBHJxankyBgVG2hy1Y=
8080
github.com/threatwinds/logger v1.2.3/go.mod h1:N+bJKvF4FQNJZLfQpVYWpr6D8iEAFnAQfHYqH5iR1TI=
8181
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=

installer/services/search.go

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ func InitOpenSearch() error {
1111
for intent := 0; intent <= 10; intent++ {
1212
time.Sleep(1 * time.Minute)
1313

14-
_, err := grequests.Get(baseURL+"_cluster/health", &grequests.RequestOptions{
15-
Params: map[string]string{
16-
"wait_for_status": "green",
17-
"timeout": "50s",
18-
},
19-
})
14+
_, err := grequests.Get(baseURL+"_cluster/health",
15+
grequests.FromRequestOptions(&grequests.RequestOptions{
16+
Params: map[string]string{
17+
"wait_for_status": "green",
18+
"timeout": "50s",
19+
},
20+
}),
21+
)
2022

2123
if err != nil {
2224
if intent >= 10 {
@@ -27,21 +29,21 @@ func InitOpenSearch() error {
2729
}
2830
}
2931

30-
_, err := grequests.Put(baseURL+"_snapshot/.utm_geoip", &grequests.RequestOptions{
31-
JSON: map[string]any{
32+
_, err := grequests.Put(baseURL+"_snapshot/.utm_geoip",
33+
grequests.JSON(map[string]any{
3234
"type": "fs",
3335
"settings": map[string]interface{}{
3436
"location": "/usr/share/opensearch/.utm_geoip/",
3537
"compress": true,
3638
},
37-
},
38-
})
39+
}),
40+
)
3941
if err != nil {
4042
return err
4143
}
4244

43-
_, err = grequests.Put(baseURL+"_index_template/utmstack_indexes", &grequests.RequestOptions{
44-
JSON: map[string]any{
45+
_, err = grequests.Put(baseURL+"_index_template/utmstack_indexes",
46+
grequests.JSON(map[string]any{
4547
"index_patterns": []string{"v11-alert-", "v11-log-", ".utm-", ".utmstack-"},
4648
"template": map[string]any{
4749
"settings": map[string]any{
@@ -50,18 +52,18 @@ func InitOpenSearch() error {
5052
"index.mapping.total_fields.limit": 50000,
5153
},
5254
},
53-
},
54-
})
55+
}),
56+
)
5557
if err != nil {
5658
return err
5759
}
5860

59-
_, err = grequests.Post(baseURL+"_snapshot/.utm_geoip/.utm_geoip/_restore", &grequests.RequestOptions{
60-
JSON: map[string]interface{}{
61+
_, err = grequests.Post(baseURL+"_snapshot/.utm_geoip/.utm_geoip/_restore",
62+
grequests.JSON(map[string]interface{}{
6163
"indices": ".utm-geoip",
6264
"include_global_state": false,
63-
},
64-
})
65+
}),
66+
)
6567
if err != nil {
6668
return err
6769
}

plugins/alerts/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ module github.com/utmstack/UTMStack/plugins/alerts
33
go 1.25.5
44

55
require (
6-
github.com/threatwinds/go-sdk v1.1.0
6+
github.com/threatwinds/go-sdk v1.1.1
77
github.com/tidwall/gjson v1.18.0
8-
google.golang.org/grpc v1.78.0
98
google.golang.org/protobuf v1.36.11
109
)
1110

@@ -51,6 +50,7 @@ require (
5150
golang.org/x/text v0.33.0 // indirect
5251
google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect
5352
google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect
53+
google.golang.org/grpc v1.78.0 // indirect
5454
gopkg.in/yaml.v3 v3.0.1 // indirect
5555
sigs.k8s.io/yaml v1.6.0 // indirect
5656
)

plugins/alerts/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
9191
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
9292
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
9393
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
94-
github.com/threatwinds/go-sdk v1.1.0 h1:2BQmmb15e+7Wuu95+b6fe5XP3o14z5c64cwV61wQziA=
95-
github.com/threatwinds/go-sdk v1.1.0/go.mod h1:3bLB1+UmtcFfCqlMguCq69q0DeTueS0iq0r8a2yIZQA=
94+
github.com/threatwinds/go-sdk v1.1.1 h1:K1rtmjhYokGvj5z/o/wwn8gD6LvkgKfxv2MyMUezRUQ=
95+
github.com/threatwinds/go-sdk v1.1.1/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
9696
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
9797
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
9898
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=

plugins/aws/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/aws/aws-sdk-go-v2/config v1.32.7
88
github.com/aws/aws-sdk-go-v2/credentials v1.19.7
99
github.com/google/uuid v1.6.0
10-
github.com/threatwinds/go-sdk v1.1.0
10+
github.com/threatwinds/go-sdk v1.1.1
1111
)
1212

1313
require (

0 commit comments

Comments
 (0)