Documentation
¶
Index ¶
- func GetAllUpdaterInfo(w http.ResponseWriter, req *http.Request)
- func NewUpdater(cfg map[string]string)
- func PostTriggerUpdater(w http.ResponseWriter, req *http.Request)
- func SetupSelfUpdater(agent *SelfUpdaterAgent)
- func TriggerUpdater(agentName string)
- func TriggerUpdaterBySelfConfig(updaterInfo *UpdateAgentInfo)
- type SelfUpdaterAgent
- type UpdateAgentInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllUpdaterInfo ¶
func GetAllUpdaterInfo(w http.ResponseWriter, req *http.Request)
GetAllUpdaterInfo get all updater info
func NewUpdater ¶
func PostTriggerUpdater ¶
func PostTriggerUpdater(w http.ResponseWriter, req *http.Request)
PostTriggerUpdater trigger updater for special agent
func SetupSelfUpdater ¶
func SetupSelfUpdater(agent *SelfUpdaterAgent)
func TriggerUpdater ¶
func TriggerUpdater(agentName string)
func TriggerUpdaterBySelfConfig ¶
func TriggerUpdaterBySelfConfig(updaterInfo *UpdateAgentInfo)
Types ¶
type SelfUpdaterAgent ¶
type SelfUpdaterAgent struct {
Updater *selfupdate.Updater
AgentName string
}
func (*SelfUpdaterAgent) GetAgentName ¶
func (agent *SelfUpdaterAgent) GetAgentName() string
type UpdateAgentInfo ¶
type UpdateAgentInfo struct {
CurrentVersion string `json:"version"`
ApiURL string `json:"api_url"`
BinURL string `json:"bin_url"`
DiffURL string `json:"diff_url"`
Dir string `json:"dir"`
CmdName string `json:"cmd_name"`
ForceCheck bool `json:"force_check"`
AgentName string `json:"agent_name"`
}
func GetAllUpdaterAgent ¶
func GetAllUpdaterAgent() []*UpdateAgentInfo
Click to show internal directories.
Click to hide internal directories.