updater

package
v1.19.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: GPL-3.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ReleaseChannel = "release"
	AlphaChannel   = "alpha"
)
View Source
const (

	// MaxPackageFileSize is a maximum package file length in bytes. The largest
	// package whose size is limited by this constant currently has the size of
	// approximately 32 MiB.
	MaxPackageFileSize = 32 * 1024 * 1024
)

Variables

View Source
var DefaultCoreUpdater = CoreUpdater{}
View Source
var DefaultUiUpdater = &UIUpdater{}
View Source
var ErrGetDatabaseUpdateSkip = errors.New("GEO database is updating, skip")

Functions

func GeoAutoUpdate added in v1.18.9

func GeoAutoUpdate() bool

func GeoUpdateInterval added in v1.18.9

func GeoUpdateInterval() int

func RegisterGeoUpdater

func RegisterGeoUpdater()

func SetGeoAutoUpdate added in v1.18.9

func SetGeoAutoUpdate(newAutoUpdate bool)

func SetGeoUpdateInterval added in v1.18.9

func SetGeoUpdateInterval(newGeoUpdateInterval int)

func UpdateASN added in v1.18.9

func UpdateASN() (err error)

func UpdateGeoDatabases

func UpdateGeoDatabases() error

func UpdateGeoIp added in v1.18.9

func UpdateGeoIp() (err error)

func UpdateGeoSite added in v1.18.9

func UpdateGeoSite() (err error)

func UpdateMMDB added in v1.18.9

func UpdateMMDB() (err error)

Types

type CoreUpdater added in v1.19.12

type CoreUpdater struct {
	// contains filtered or unexported fields
}

CoreUpdater is the mihomo updater. modify from https://github.com/AdguardTeam/AdGuardHome/blob/595484e0b3fb4c457f9bb727a6b94faa78a66c5f/internal/updater/updater.go

func (*CoreUpdater) CoreBaseName added in v1.19.12

func (u *CoreUpdater) CoreBaseName() string

func (*CoreUpdater) Update added in v1.19.12

func (u *CoreUpdater) Update(currentExePath string, channel string, force bool) (err error)

type UIUpdater added in v1.18.10

type UIUpdater struct {
	// contains filtered or unexported fields
}

func NewUiUpdater added in v1.18.10

func NewUiUpdater(externalUI, externalUIURL, externalUIName string) *UIUpdater

func (*UIUpdater) AutoDownloadUI added in v1.18.10

func (u *UIUpdater) AutoDownloadUI()

func (*UIUpdater) DownloadUI added in v1.18.10

func (u *UIUpdater) DownloadUI() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL