37 lines
459 B
Go
37 lines
459 B
Go
|
// +build android
|
||
|
|
||
|
package provider
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
suspended bool
|
||
|
)
|
||
|
|
||
|
type UpdatableProvider interface {
|
||
|
UpdatedAt() time.Time
|
||
|
}
|
||
|
|
||
|
func (pp *proxySetProvider) UpdatedAt() time.Time {
|
||
|
return pp.Fetcher.UpdatedAt
|
||
|
}
|
||
|
|
||
|
func (pp *proxySetProvider) Close() error {
|
||
|
pp.healthCheck.close()
|
||
|
pp.Fetcher.Destroy()
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (cp *compatibleProvider) Close() error {
|
||
|
cp.healthCheck.close()
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func Suspend(s bool) {
|
||
|
suspended = s
|
||
|
}
|