hybrid

package
v0.0.0-...-429e9f6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFingerprint

func CheckFingerprint()

In previous versions, we used the fingerprint generated by the Agent itself as the unique ID of hybrid instance and saved it in the hybrid/fingerprint file. The hybrid/machine-id still stored the original ID, which caused ambiguity. Now we discard the hybrid/fingerprint file and save the fingerprint directly to the hybrid/machine-id file. So we need to check the hybrid/fingerprint file. If it exists, copy the fingerprint to hybrid/machind-id and delete the hybrid/fingerprint file.

func Register

func Register(region string, code string, id string, name string, networkmode string, need_restart bool, tags []Tag) (ret bool)

func UnRegister

func UnRegister(need_restart bool) bool

Types

type RegisterInfo

type RegisterInfo struct {
	Code            string `json:"activationCode"`
	MachineId       string `json:"machineId"`
	Fingerprint     string `json:"fingerprint"`
	RegionId        string `json:"regionId"`
	InstanceName    string `json:"instanceName"`
	Hostname        string `json:"hostname"`
	IntranetIp      string `json:"intranetIp"`
	OsVersion       string `json:"osVersion"`
	OsType          string `json:"osType"`
	ClientVersion   string `json:"agentVersion"`
	PublicKeyBase64 string `json:"publicKey"`
	Id              string `json:"activationId"`
	Tag             []Tag  `json:"tag"`
}

type Tag

type Tag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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