agent

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UBUNTU = "UBUNTU"
	CENTOS = "CENTOS"
)
View Source
const (
	AgentListKey = "agentlist"
)

Variables

This section is empty.

Functions

func GetPackageName

func GetPackageName(path string) (string, error)

func InstallTelegraf

func InstallTelegraf(nsId string, mcisId string, vmId string, publicIp string, userName string, sshKey string, cspType string, port string) (int, error)

func MakeAgentUUID added in v0.3.5

func MakeAgentUUID(nsId string, mcisId string, vmId string, cspType string) string

func PutAgentMetadataToStore added in v0.3.5

func PutAgentMetadataToStore(agentUUID string, agentInfo AgentInfo) error

func SetMetadataByAgentInstall added in v0.3.5

func SetMetadataByAgentInstall(nsId string, mcisId string, vmId string, cspType string, publicIp string) error

func SetMetadataByAgentUninstall added in v0.3.5

func SetMetadataByAgentUninstall(nsId string, mcisId string, vmId string, cspType string) error

func UninstallAgent

func UninstallAgent(
	nsId string,
	mcisId string,
	vmId string,
	publicIp string,
	userName string,
	sshKey string,
	cspType string,
	port string,
) (int, error)

전체 에이전트 삭제 테스트용 코드

Types

type AgentHealth added in v0.3.5

type AgentHealth string

AgentHealth 에이전트 구동 상태 (정상, 비정상)

const (
	Healthy   AgentHealth = "healthy"
	Unhealthy AgentHealth = "unhealthy"
)

type AgentInfo added in v0.3.5

type AgentInfo struct {
	NsId                  string `json:"ns_id"`
	McisId                string `json:"mcis_id"`
	VmId                  string `json:"vm_id"`
	CspType               string `json:"csp_type"`
	AgentType             string `json:"agent_type"`
	AgentState            string `json:"agent_state"`
	AgentHealth           string `json:"agent_health"`
	AgentUnhealthyRespCnt int    `json:"agent_unhealthy_resp_cnt"`
	PublicIp              string `json:"public_ip"`
}

AgentInfo 에이전트 상세 정보

type AgentListManager added in v0.3.5

type AgentListManager struct{}

AgentListManager 에이전트 목록 관리

func (AgentListManager) DeleteAgent added in v0.3.5

func (a AgentListManager) DeleteAgent(uuid string) error

func (AgentListManager) GetAgentInfo added in v0.3.5

func (a AgentListManager) GetAgentInfo(uuid string) (AgentInfo, error)

func (AgentListManager) GetAgentList added in v0.3.5

func (a AgentListManager) GetAgentList() (map[string]AgentInfo, error)

func (AgentListManager) PutAgent added in v0.3.5

func (a AgentListManager) PutAgent(uuid string, agentInfo AgentInfo) error

type AgentState added in v0.3.5

type AgentState string

AgentState 에이전트 설치 상태 (설치, 제거)

const (
	Enable  AgentState = "enable"
	Disable AgentState = "disable"
)

type AgentType added in v0.3.5

type AgentType string

AgentType 에이전트 동작 메커니즘 유형 (Push, Pull)

const (
	Push AgentType = "push"
	Pull AgentType = "pull"
)

Jump to

Keyboard shortcuts

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