You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
kratos/examples/event/event/event.go

20 lines
320 B

package event
import "context"
type Event interface {
Key() string
Value() []byte
}
type Handler func(context.Context, Event) error
type Sender interface {
Send(ctx context.Context, msg Event) error
Close() error
}
type Receiver interface {
Receive(ctx context.Context, handler Handler) error
Close() error
}