All checks were successful
continuous-integration/drone/push Build is passing
21 lines
373 B
Go
21 lines
373 B
Go
package storage
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Service interface {
|
|
Subscribe(topic string, subscriber Subscriber) error
|
|
Unsubscribe(topic, callback string) error
|
|
Subscribers(topic string) ([]Subscriber, error)
|
|
RemoveExpiredSubscribers() error
|
|
Close() error
|
|
}
|
|
|
|
type Subscriber struct {
|
|
Callback string
|
|
LeaseSeconds int64
|
|
Secret string
|
|
Created time.Time
|
|
}
|