mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-27 01:07:10 +00:00
feat: share more code from android branch
This commit is contained in:
27
rules/provider/patch_android.go
Normal file
27
rules/provider/patch_android.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// +build android
|
||||
|
||||
package provider
|
||||
|
||||
import "time"
|
||||
|
||||
var (
|
||||
suspended bool
|
||||
)
|
||||
|
||||
type UpdatableProvider interface {
|
||||
UpdatedAt() time.Time
|
||||
}
|
||||
|
||||
func (f *ruleSetProvider) UpdatedAt() time.Time {
|
||||
return f.Fetcher.UpdatedAt
|
||||
}
|
||||
|
||||
func (rp *ruleSetProvider) Close() error {
|
||||
rp.Fetcher.Destroy()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func Suspend(s bool) {
|
||||
suspended = s
|
||||
}
|
||||
Reference in New Issue
Block a user