agent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAgentExecutablePath

func GetAgentExecutablePath(orgId string) (string, error)

func GetConfigFilePath

func GetConfigFilePath(orgId string) (string, error)

func GetLogFilePath

func GetLogFilePath(orgId string) (string, error)

func GetOrgIdFromExecutable

func GetOrgIdFromExecutable() (string, error)

func GetScriptsDirectory

func GetScriptsDirectory(orgId string) (string, error)

func GetServiceExecutablePath

func GetServiceExecutablePath(orgId string) (string, error)

func GetServiceManagerPath

func GetServiceManagerPath(orgId string) (string, error)

func GetServiceName

func GetServiceName(orgId string) string

Types

type Device

type Device struct {
	DeviceId        string `json:"device_id"`
	RewstOrgId      string `json:"rewst_org_id"`
	RewstEngineHost string `json:"rewst_engine_host"`
	SharedAccessKey string `json:"shared_access_key"`
	AzureIotHubHost string `json:"azure_iot_hub_host"`
	Broker          string `json:"broker"`
}

func (*Device) Load

func (device *Device) Load(configFilePath string) error

func (*Device) Subscribe

func (device *Device) Subscribe(ctx context.Context) <-chan mqtt.Event

type HostInfo

type HostInfo struct {
	AgentVersion          string  `json:"agent_version"`
	AgentExecutablePath   string  `json:"agent_executable_path"`
	AgentApp              string  `json:"agent_app"`
	ServiceExecutablePath string  `json:"service_executable_path"`
	HostName              string  `json:"hostname"`
	MacAddress            *string `json:"mac_address"`
	OperatingSystem       string  `json:"operating_system"`
	CpuModel              string  `json:"cpu_model"`
	RamGb                 string  `json:"ram_gb"`
	AdDomain              *string `json:"ad_domain"`
	IsAdDomainController  bool    `json:"is_ad_domain_controller"`
	IsEntraConnectServer  bool    `json:"is_entra_connect_server"`
	EntraDomain           *string `json:"entra_domain"`
	OrgId                 string  `json:"org_id"`
}

func (*HostInfo) Load

func (hostInfo *HostInfo) Load(ctx context.Context, orgId string) error

type PathsData

type PathsData struct {
	ServiceExecutablePath string   `json:"service_executable_path"`
	AgentExecutablePath   string   `json:"agent_executable_path"`
	ConfigFilePath        string   `json:"config_file_path"`
	ServiceManagerPath    string   `json:"service_manager_path"`
	Tags                  HostInfo `json:"tags"`
}

func (*PathsData) Load

func (paths *PathsData) Load(ctx context.Context, orgId string) error

Jump to

Keyboard shortcuts

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