mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
28 lines
492 B
Go
28 lines
492 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/kolide/fleet/server/kolide"
|
|
)
|
|
|
|
func (mw loggingMiddleware) ImportConfig(ctx context.Context, cfg *kolide.ImportConfig) (*kolide.ImportConfigResponse, error) {
|
|
var (
|
|
resp *kolide.ImportConfigResponse
|
|
err error
|
|
)
|
|
|
|
defer func(begin time.Time) {
|
|
_ = mw.logger.Log(
|
|
"method", "ImportConfig",
|
|
"err", err,
|
|
"took", time.Since(begin),
|
|
)
|
|
}(time.Now())
|
|
|
|
resp, err = mw.Service.ImportConfig(ctx, cfg)
|
|
return resp, err
|
|
|
|
}
|