wheat-cache/pkg/event/define.go

26 lines
333 B
Go

package event
import (
"context"
)
type eventType int8
const (
normalEvent = eventType(iota)
waitEvent
)
type DriverInterface interface {
Get() *Event
Put(event *Event)
}
type ProduceInterface interface {
Call(ctx context.Context, event *Event)
}
type ConsumerInterface interface {
Receive(ctx context.Context) *Event
}