websub-hub/cmd/hubserver/storage/storage.go

22 lines
341 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)
Close() error
}
type Subscriber struct {
Callback string
LeaseSeconds int64
Secret string
Created time.Time
}