Skip to content
Prev Previous commit
Next Next commit
cleanup
  • Loading branch information
owen-d committed Dec 2, 2024
commit 616583aeb8426002973a0a987a251b35f7389ed6
1 change: 1 addition & 0 deletions pkg/blockbuilder/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func NewJobQueue() *JobQueue {
}

// Enqueue adds a new job to the pending queue
// This is a naive implementation, intended to be refactored
func (q *JobQueue) Enqueue(job *Job) error {
q.mu.Lock()
defer q.mu.Unlock()
Expand Down
10 changes: 5 additions & 5 deletions pkg/blockbuilder/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ type Scheduler interface {
// unimplementedScheduler provides default implementations that panic.
type unimplementedScheduler struct{}

func (s *unimplementedScheduler) HandleGetJob(ctx context.Context, builderID string) (*Job, bool, error) {
func (s *unimplementedScheduler) HandleGetJob(_ context.Context, _ string) (*Job, bool, error) {
panic("unimplemented")
}

func (s *unimplementedScheduler) HandleCompleteJob(ctx context.Context, builderID string, job *Job) error {
func (s *unimplementedScheduler) HandleCompleteJob(_ context.Context, _ string, _ *Job) error {
panic("unimplemented")
}

func (s *unimplementedScheduler) HandleSyncJob(ctx context.Context, builderID string, job *Job) error {
func (s *unimplementedScheduler) HandleSyncJob(_ context.Context, _ string, _ *Job) error {
panic("unimplemented")
}

Expand All @@ -51,10 +51,10 @@ func (s *SchedulerImpl) HandleGetJob(ctx context.Context, builderID string) (*Jo
}
}

func (s *SchedulerImpl) HandleCompleteJob(ctx context.Context, builderID string, job *Job) error {
func (s *SchedulerImpl) HandleCompleteJob(_ context.Context, builderID string, job *Job) error {
return s.queue.MarkComplete(job.ID, builderID)
}

func (s *SchedulerImpl) HandleSyncJob(ctx context.Context, builderID string, job *Job) error {
func (s *SchedulerImpl) HandleSyncJob(_ context.Context, builderID string, job *Job) error {
return s.queue.SyncJob(job.ID, builderID, job)
}
6 changes: 3 additions & 3 deletions pkg/blockbuilder/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ type Transport interface {
// unimplementedTransport provides default implementations that panic
type unimplementedTransport struct{}

func (t *unimplementedTransport) SendGetJobRequest(ctx context.Context, req *GetJobRequest) (*GetJobResponse, error) {
func (t *unimplementedTransport) SendGetJobRequest(_ context.Context, _ *GetJobRequest) (*GetJobResponse, error) {
panic("unimplemented")
}

func (t *unimplementedTransport) SendCompleteJob(ctx context.Context, req *CompleteJobRequest) error {
func (t *unimplementedTransport) SendCompleteJob(_ context.Context, _ *CompleteJobRequest) error {
panic("unimplemented")
}

func (t *unimplementedTransport) SendSyncJob(ctx context.Context, req *SyncJobRequest) error {
func (t *unimplementedTransport) SendSyncJob(_ context.Context, _ *SyncJobRequest) error {
panic("unimplemented")
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/blockbuilder/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ type Worker interface {
// unimplementedWorker provides default implementations for the Worker interface.
type unimplementedWorker struct{}

func (u *unimplementedWorker) GetJob(ctx context.Context) (*Job, bool, error) {
func (u *unimplementedWorker) GetJob(_ context.Context) (*Job, bool, error) {
panic("unimplemented")
}

func (u *unimplementedWorker) CompleteJob(ctx context.Context, job *Job) error {
func (u *unimplementedWorker) CompleteJob(_ context.Context, _ *Job) error {
panic("unimplemented")
}

func (u *unimplementedWorker) SyncJob(ctx context.Context, job *Job) error {
func (u *unimplementedWorker) SyncJob(_ context.Context, _ *Job) error {
panic("unimplemented")
}

Expand Down