Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
avoid lint error
  • Loading branch information
chenyu468 committed Apr 9, 2024
commit 824829f44e1bb90ad9fd71018b6884d088e51181
16 changes: 7 additions & 9 deletions kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@ package kafka

import (
"context"
"sync"

"github.com/golang-queue/queue"
"github.com/golang-queue/queue/core"
kafkaAPI "github.com/segmentio/kafka-go"
)

var _ core.Worker = (*Worker)(nil)

type Worker struct {
//
//shutdown func() //
stop chan struct{}
stopFlag int32
stopOnce sync.Once
startOnce sync.Once
opts options
conn kafkaAPI.Dialer
// stop chan struct{}
// stopFlag int32
// stopOnce sync.Once
// startOnce sync.Once
opts options
// conn kafkaAPI.Dialer
}

func NewWorker(opts ...Option) *Worker {
Expand Down Expand Up @@ -60,7 +58,7 @@ func (w *Worker) Queue(job core.QueuedMessage) (err error) {
}

func (w *Worker) Request() (core.QueuedMessage, error) {

_ = w.startConsumer()
return nil, queue.ErrNoTaskInQueue

}