Function
NewImportMediator
(ctx context.Context, client *rateLimitHandlerClient, owner, project string, since time.Time)
Source from the content-addressed store, hash-verified
| 43 | } |
| 44 | |
| 45 | func NewImportMediator(ctx context.Context, client *rateLimitHandlerClient, owner, project string, since time.Time) *importMediator { |
| 46 | mm := importMediator{ |
| 47 | gh: client, |
| 48 | owner: owner, |
| 49 | project: project, |
| 50 | since: since, |
| 51 | importEvents: make(chan ImportEvent, ChanCapacity), |
| 52 | err: nil, |
| 53 | } |
| 54 | |
| 55 | go mm.start(ctx) |
| 56 | |
| 57 | return &mm |
| 58 | } |
| 59 | |
| 60 | func (mm *importMediator) start(ctx context.Context) { |
| 61 | ctx, cancel := context.WithCancel(ctx) |
Tested by
no test coverage detected