mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
1eccf9a874
- Add warning message when Redis fails - Disable query button when Redis fails - Refactor SMTP warning banner into component for reuse Closes #2073
25 lines
547 B
Go
25 lines
547 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/go-kit/kit/endpoint"
|
|
"github.com/kolide/fleet/server/kolide"
|
|
)
|
|
|
|
type statusResultStoreResponse struct {
|
|
Err error `json:"error,omitempty"`
|
|
}
|
|
|
|
func (m statusResultStoreResponse) error() error { return m.Err }
|
|
|
|
func makeStatusResultStoreEndpoint(svc kolide.Service) endpoint.Endpoint {
|
|
return func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
var resp statusResultStoreResponse
|
|
if err := svc.StatusResultStore(ctx); err != nil {
|
|
resp.Err = err
|
|
}
|
|
return resp, nil
|
|
}
|
|
}
|