Documentation ¶
Index ¶
- Constants
- func DownloadFile(filepath string, url string) error
- func FetchRelease(myTag string) (string, error)
- func GetCacheDir() string
- func GetLatestApplication(ctx *FetcherContext) (string, error)
- func GetUpdaterDir() string
- func GetWorkDir() string
- func SetLatestApplication(ctx *FetcherContext, path string) error
- func SetWorkDir(wd string)
- func TestUpload(personalAccessToken string)
- type Asset
- type FetcherContext
- type InstanceID
- type InstanceInfo
- type MachineStats
- type Release
- type TokenSource
Constants ¶
View Source
const CURRENT_APP = "currentApp"
View Source
const INSTANCE_ID_KEY = "instanceID"
View Source
const (
NORMAL_EXIT = 0
)
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶ added in v0.0.2
func FetchRelease ¶ added in v0.0.2
func GetCacheDir ¶ added in v0.0.2
func GetCacheDir() string
func GetLatestApplication ¶ added in v0.0.2
func GetLatestApplication(ctx *FetcherContext) (string, error)
func GetUpdaterDir ¶ added in v0.0.2
func GetUpdaterDir() string
func GetWorkDir ¶ added in v0.0.2
func GetWorkDir() string
func SetLatestApplication ¶ added in v0.0.2
func SetLatestApplication(ctx *FetcherContext, path string) error
func SetWorkDir ¶ added in v0.0.2
func SetWorkDir(wd string)
func TestUpload ¶ added in v0.0.2
func TestUpload(personalAccessToken string)
Types ¶
type FetcherContext ¶ added in v0.0.2
type FetcherContext struct {
// contains filtered or unexported fields
}
func InitFetcher ¶ added in v0.0.2
func InitFetcher(storagePath string) FetcherContext
type InstanceID ¶ added in v0.0.2
type InstanceID struct { Id string `json:"id"` Cloud string `json:"cloud"` Addr string `json:"addr"` }
func GetInstanceID ¶ added in v0.0.2
func GetInstanceID() *InstanceID
type InstanceInfo ¶ added in v0.0.2
type InstanceInfo struct { Version string `json:"version"` Instance InstanceID `json:"instance"` Stat MachineStats `json:"stat"` }
func Fetch ¶ added in v0.0.2
func Fetch(ctx *FetcherContext) (*InstanceInfo, error)
type MachineStats ¶ added in v0.0.2
type MachineStats struct { TotalMemory uint64 `json:"totalMemory"` UsedMemory uint64 `json:"usedMemory"` CpuLoad float32 `json:"cpuLoad"` BytesSent uint64 `json:"bytesSent"` ByteReceived uint64 `json:"byteReceived"` }
func GetMachineStats ¶ added in v0.0.2
func GetMachineStats() (*MachineStats, error)
type Release ¶
func ListReleases ¶
type TokenSource ¶ added in v0.0.2
type TokenSource struct {
AccessToken string
}
----------------------------------------------------------------------------------
Click to show internal directories.
Click to hide internal directories.