Add Created time to Subscriber
This commit is contained in:
parent
22d75a2da6
commit
9baab2fda9
|
@ -30,6 +30,7 @@ type Subscriber struct {
|
||||||
Callback string
|
Callback string
|
||||||
LeaseSeconds int64
|
LeaseSeconds int64
|
||||||
Secret string
|
Secret string
|
||||||
|
Created time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
type Stat struct {
|
type Stat struct {
|
||||||
|
@ -190,7 +191,7 @@ func (handler *subscriptionHandler) handleSubscription(w http.ResponseWriter, r
|
||||||
|
|
||||||
if validateURL(validationURL.String(), ourChallenge) {
|
if validateURL(validationURL.String(), ourChallenge) {
|
||||||
log.Printf("subscribe: validation valid\n")
|
log.Printf("subscribe: validation valid\n")
|
||||||
handler.addSubscriberCallback(topicURL.String(), Subscriber{callbackURL.String(), leaseSeconds, secret})
|
handler.addSubscriberCallback(topicURL.String(), Subscriber{callbackURL.String(), leaseSeconds, secret, time.Now()})
|
||||||
} else {
|
} else {
|
||||||
log.Printf("subscribe: validation failed\n")
|
log.Printf("subscribe: validation failed\n")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user