client

package
v0.0.0-...-ecc5721 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigUrl = `http://%s/api/v6/component/GetComponentInstances`
	TagsUrl   = `http://%s/api/v1/agent/queryInfo`
)
View Source
const TaskUrl = `http://%s/api/v1/agent/updateSubTask`
View Source
const (
	UploadFileUrl = "http://%s/api/v6/shared/Upload"
)

Variables

This section is empty.

Functions

func GetConfigFromRemote

func GetConfigFromRemote(agentID string, detail map[string]interface{}) ([]*pb.ConfigItem, error)

func GetExtraInfoFromRemote

func GetExtraInfoFromRemote(idList []string) (map[string]AgentExtraInfo, error)

func PostTask

func PostTask(postList []map[string]string)

func UploadFile

func UploadFile(filePath string, hash string) (string, error)

Types

type AgentExtraInfo

type AgentExtraInfo struct {
	Tags    string `json:"tags"`
	PSMName string `json:"psm_name"`
	PSMPath string `json:"psm_path"`
}

type ConfigMsg

type ConfigMsg struct {
	Name        string   `json:"name,omitempty"`
	Type        string   `json:"type,omitempty"`
	Signature   string   `json:"signature,omitempty"`
	Version     string   `json:"version,omitempty"`
	SHA256      string   `json:"sha256,omitempty"`
	DownloadURL []string `json:"download_url,omitempty"`
	Detail      string   `json:"detail,omitempty"`
}

type ResAgentConf

type ResAgentConf struct {
	Code    int         `json:"code"`
	Message string      `json:"msg"`
	Data    []ConfigMsg `json:"data"`
}

type ResAgentTags

type ResAgentTags struct {
	Code    int                       `json:"code"`
	Message string                    `json:"msg"`
	Data    map[string]AgentExtraInfo `json:"data"`
}

type ResTaskConf

type ResTaskConf struct {
	Code    int    `json:"code"`
	Message string `json:"msg"`
}

type UploadResp

type UploadResp struct {
	Code    int    `json:"code"`
	Message string `json:"msg"`
	Data    string `json:"data"`
}

Jump to

Keyboard shortcuts

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