https://github.com/quickwit-oss/quickwit-go
https://github.com/quickwit-oss/quickwit-go
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/quickwit-oss/quickwit-go
- Owner: quickwit-oss
- License: mit
- Created: 2023-03-18T20:10:17.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-29T11:51:40.000Z (about 2 years ago)
- Last Synced: 2025-01-01T09:25:52.810Z (over 1 year ago)
- Language: Go
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Quickwit Go Client
WARNING: This is a work in progress and can be used only for testing purposes.
## Installation
```bash
go get github.com/quickwit-oss/quickwit-go
```
## Testing the client
### Start a Quickwit instance
```bash
docker run -it --rm -p 7280:7280 quickwit/quickwit
```
### Execute a search query
```go
package main
import (
"fmt"
"github.com/quickwit-oss/quickwit-go"
)
func main() {
qclient := quickwit.NewQuickwitClient("http://localhost:7280")
searchRequest := quickwit.SearchRequest{Query: "severity_text:error"}
// otel-logs-v0 is created when quickwit starts.
searchResponse, err := qclient.Search("otel-logs-v0", searchRequest)
if err != nil {
fmt.Println(err)
return
}
fmt.Println("--------------------")
fmt.Println("response", searchResponse)
}
```