agent

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func DeleteAgent

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

func GetPackageName

func GetPackageName(path string) (string, error)

func InstallAgent

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

func ListAgent

func ListAgent() (map[string]AgentInfo, error)

func MakeAgentUUID

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

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

type AgentHealth string

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

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

type AgentInfo

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"`
	ServiceType           string `json:"service_type"`
}

AgentInfo 에이전트 상세 정보

func GetAgent

func GetAgent(nsId string, mcisId string, vmId string, cspType string) (AgentInfo, error)

func NewAgentInfo

func NewAgentInfo(nsId string, mcisId string, vmId string, cspType string, publicIp string, isHealth bool, serviceType string) AgentInfo

func PutAgent

func PutAgent(nsId string, mcisId string, vmId string, cspType string, publicIp string, isHealth bool, serviceType string) (string, AgentInfo, error)

func PutAgent(agentUUID string, agentInfo AgentInfo) error { nsId string, mcisId string, vmId string, cspType string, publicIp string

type AgentState

type AgentState string

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

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

type AgentType

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