(ctx context.Context, store dbCommon.Store, entity params.ForgeEntity, providers map[string]common.Provider)
| 35 | ) |
| 36 | |
| 37 | func NewWorker(ctx context.Context, store dbCommon.Store, entity params.ForgeEntity, providers map[string]common.Provider) (*Worker, error) { |
| 38 | consumerID := fmt.Sprintf("entity-worker-%s", entity.ID) |
| 39 | |
| 40 | ctx = garmUtil.WithSlogContext( |
| 41 | ctx, |
| 42 | slog.Any("worker", consumerID)) |
| 43 | |
| 44 | return &Worker{ |
| 45 | ctx: ctx, |
| 46 | consumerID: consumerID, |
| 47 | store: store, |
| 48 | Entity: entity, |
| 49 | providers: providers, |
| 50 | }, nil |
| 51 | } |
| 52 | |
| 53 | type Worker struct { |
| 54 | ctx context.Context |
no outgoing calls
no test coverage detected