18 lines
266 B
Go
18 lines
266 B
Go
|
package event
|
||
|
|
||
|
import "context"
|
||
|
|
||
|
type Produce struct {
|
||
|
driver DriverInterface
|
||
|
}
|
||
|
|
||
|
func (p *Produce) Call(ctx context.Context, event *Event) {
|
||
|
p.driver.Put(event)
|
||
|
}
|
||
|
|
||
|
func NewProduce(driver DriverInterface) ProduceInterface {
|
||
|
return &Produce{
|
||
|
driver: driver,
|
||
|
}
|
||
|
}
|