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

Update to opensearch v4 #11

Merged
merged 3 commits into from
Dec 19, 2024
Merged
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
9 changes: 3 additions & 6 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

log "github.com/sirupsen/logrus"

opensearch "github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
opensearch "github.com/opensearch-project/opensearch-go/v4"
"github.com/opensearch-project/opensearch-go/v4/opensearchapi"
"github.com/shopsmart/opensearchconfig-go"
)

Expand All @@ -32,11 +32,8 @@ func main() {

// PingOpenSearch will make a ping request to the opensearch cluster
func PingOpenSearch(ctx context.Context, client *opensearch.Client) error {
ping := opensearchapi.PingRequest{}

log.Debug("making a ping request to opensearch")

resp, err := ping.Do(ctx, client)
resp, err := client.Do(ctx, opensearchapi.PingReq{}, nil)
if err != nil {
log.Fatal(err)
}
Expand Down
31 changes: 17 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
module github.com/shopsmart/opensearchconfig-go

go 1.19
go 1.21

toolchain go1.21.5

require (
github.com/aws/aws-sdk-go-v2/config v1.18.31
github.com/aws/aws-sdk-go-v2/config v1.27.11
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.27.10
github.com/opensearch-project/opensearch-go/v2 v2.1.0
github.com/opensearch-project/opensearch-go/v4 v4.0.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/viper v1.16.0
)
Expand All @@ -20,7 +22,8 @@ require (
github.com/DataDog/go-tuf v0.3.0--fix-localmeta-fork // indirect
github.com/DataDog/sketches-go v1.2.1 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/ebitengine/purego v0.4.0-alpha.4.0.20230519103000-ee8dcecc618f // indirect
Expand All @@ -40,16 +43,16 @@ require (
)

require (
github.com/aws/aws-sdk-go-v2 v1.20.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.30 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.7 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.37 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.31 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.38 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.31 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.13.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.21.0 // indirect
github.com/aws/smithy-go v1.14.0 // indirect
github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect
github.com/aws/smithy-go v1.20.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand Down
Loading
Loading