func (o *Option) NewProducer() (p *Producer, err error) {
	p = &Producer{
		info: info.Producer{Bus: "pubsub", Sent: make(map[string]int)},
	}
	p.ctx, p.cncl = context.WithCancel(context.Background())
	p.client, err = o.newClient()
	if err != nil {
		return nil, err
	}
	return p, nil
}
NewProducer will create a new pubsub producer for publishing messages to pubsub
package pubsub
import (
	"context"
	"errors"
	"fmt"
	"sync"
	"time"
	ps "cloud.google.com/go/pubsub"
	"github.com/pcelvng/task/bus/info"
)
type Producer struct {
	client *ps.Client
	ctx  context.Context
	cncl context.CancelFunc
	info info.Producer
	mux sync.Mutex
}