Drop CollectedAt from the example DummyData
This commit is contained in:
parent
3f02da9041
commit
780fbdd57d
1 changed files with 2 additions and 5 deletions
|
|
@ -133,7 +133,6 @@ const ObservationKeyDummy = "dummy"
|
|||
type DummyData struct {
|
||||
Message string `json:"message"`
|
||||
Score float64 `json:"score"`
|
||||
CollectedAt time.Time `json:"collected_at"`
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -197,7 +196,6 @@ func (p *dummyProvider) Collect(ctx context.Context, opts CheckerOptions) (any,
|
|||
return &DummyData{
|
||||
Message: message,
|
||||
Score: score,
|
||||
CollectedAt: time.Now(),
|
||||
}, nil
|
||||
}
|
||||
```
|
||||
|
|
@ -525,7 +523,6 @@ Response:
|
|||
"data": {
|
||||
"message": "Testing my checker!",
|
||||
"score": 73.2,
|
||||
"collected_at": "2026-01-15T10:30:00Z"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
@ -537,7 +534,7 @@ curl -X POST http://localhost:8080/evaluate \
|
|||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"observations": {
|
||||
"dummy": "{\"message\":\"test\",\"score\":42.5,\"collected_at\":\"2026-01-15T10:30:00Z\"}"
|
||||
"dummy": "{\"message\":\"test\",\"score\":42.5}"
|
||||
},
|
||||
"options": {
|
||||
"warningThreshold": 50,
|
||||
|
|
@ -570,7 +567,7 @@ Status codes: `1` = OK, `3` = Warning, `4` = Critical.
|
|||
curl -X POST http://localhost:8080/report \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"data": "{\"message\":\"test\",\"score\":73.2,\"collected_at\":\"2026-01-15T10:30:00Z\"}"
|
||||
"data": "{\"message\":\"test\",\"score\":73.2}"
|
||||
}'
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue