fix pipeline #365

Merged
vtolstov merged 14 commits from :atolstikhin-v3 into v3 2024-12-06 19:05:28 +03:00
Showing only changes of commit e0f3418e80 - Show all commits

View File

@ -6,6 +6,14 @@ import (
"errors"
)
type EventType int
const (
EventTypeUnknown = iota
EventTypeConnect
EventTypeDisconnect
)
var (
// ErrNotFound is returned when a key doesn't exist
ErrNotFound = errors.New("not found")
@ -17,6 +25,11 @@ var (
DefaultSeparator = "/"
)
type Event interface {
Error() error
Type() EventType
}
// Store is a data storage interface
type Store interface {
Name() string
@ -41,3 +54,12 @@ type Store interface {
// String returns the name of the implementation.
String() string
}
type Watcher interface {
// Next is a blocking call
Next() (Event, error)
// Stop stops the watcher
Stop()
}
func Watch(context.Context) (Watcher, error)