github.com/kaydxh/golang@v0.0.131/pkg/pool/taskqueue/task.go (about)

     1  package taskqueue
     2  
     3  import (
     4  	"context"
     5  	"sync"
     6  
     7  	queue_ "github.com/kaydxh/golang/pkg/pool/taskqueue/queue"
     8  )
     9  
    10  type TaskOptions struct {
    11  	Name string
    12  }
    13  
    14  type Task struct {
    15  	opts TaskOptions
    16  }
    17  
    18  type TaskerMap sync.Map
    19  
    20  type Tasker interface {
    21  	TaskHandler(ctx context.Context, message *queue_.Message) (*queue_.MessageResult, error)
    22  	Scheme() string
    23  }