mirror of
https://github.com/go-gost/core.git
synced 2024-08-11 17:44:43 +00:00
23 lines
333 B
Go
23 lines
333 B
Go
package observer
|
|
|
|
import "context"
|
|
|
|
type Options struct{}
|
|
|
|
type Option func(opts *Options)
|
|
|
|
type Observer interface {
|
|
Observe(ctx context.Context, events []Event, opts ...Option) error
|
|
}
|
|
|
|
type EventType string
|
|
|
|
const (
|
|
EventStatus EventType = "status"
|
|
EventStats EventType = "stats"
|
|
)
|
|
|
|
type Event interface {
|
|
Type() EventType
|
|
}
|