fleet/server/service/logging_import_config.go
2017-06-22 15:50:45 -04:00

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
}