mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
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
|
||
|
}
|
||
|
}
|