Documentation
¶
Index ¶
- Variables
- func DefaultBaseBackoff() time.Duration
- func DefaultMaxRetries() int
- func DefaultUpdateInterval() time.Duration
- func GetAgentExecutablePath(orgId string) string
- func GetConfigFilePath(orgId string) string
- func GetDataDirectory(orgId string) string
- func GetLogFilePath(orgId string) string
- func GetProgramDirectory(orgId string) string
- func GetScriptsDirectory(orgId string) string
- func GetServiceExecutablePath(orgId string) string
- func GetServiceManagerPath(orgId string) string
- func GetServiceName(orgId string) string
- type Asset
- type AutoUpdateRunner
- type Device
- type DomainInfoProvider
- type HostInfo
- type PathsData
- type Plugin
- type Release
- type RunCommandFunc
- type SystemInfoProvider
- type Updater
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMACAddress = errors.New("no MAC address found")
ErrNoMACAddress is returned by MACAddress when no network interface with a hardware address is found.
Functions ¶
func DefaultBaseBackoff ¶ added in v1.2.1
DefaultBaseBackoff returns the base backoff duration for update retries. Uses baseBackoffStr if set via ldflags, otherwise defaults to 5 minutes.
func DefaultMaxRetries ¶ added in v1.2.1
func DefaultMaxRetries() int
DefaultMaxRetries returns the maximum number of update retry attempts. Uses maxRetriesStr if set via ldflags, otherwise defaults to 5.
func DefaultUpdateInterval ¶ added in v1.2.0
DefaultUpdateInterval returns the auto-update check interval. Uses updateIntervalStr if set via ldflags, otherwise defaults to 48 hours.
func GetAgentExecutablePath ¶
func GetConfigFilePath ¶
func GetDataDirectory ¶ added in v0.4.0
func GetLogFilePath ¶
func GetProgramDirectory ¶ added in v0.4.0
func GetScriptsDirectory ¶
func GetServiceManagerPath ¶
func GetServiceName ¶
Types ¶
type AutoUpdateRunner ¶ added in v1.0.0
type AutoUpdateRunner struct {
// contains filtered or unexported fields
}
func NewAutoUpdateRunner ¶ added in v1.0.0
func (*AutoUpdateRunner) Start ¶ added in v1.0.0
func (r *AutoUpdateRunner) Start()
func (*AutoUpdateRunner) Stop ¶ added in v1.0.0
func (r *AutoUpdateRunner) Stop()
type Device ¶
type Device struct {
DeviceId string `json:"device_id"`
RewstOrgId string `json:"rewst_org_id"`
RewstEngineHost string `json:"rewst_engine_host"`
AzureIotHubHost string `json:"azure_iot_hub_host"`
Broker string `json:"broker"`
LoggingLevel utils.LoggingLevel `json:"logging_level"`
UseSyslog bool `json:"syslog"`
Plugins []Plugin `json:"plugins"`
DisableAgentPostback bool `json:"disable_agent_postback"`
DisableAutoUpdates bool `json:"disable_auto_updates"`
GithubToken string `json:"github_token,omitempty"`
MqttQos *byte `json:"mqtt_qos,omitempty"`
}
type DomainInfoProvider ¶ added in v1.0.0
type DomainInfoProvider interface {
ADDomain(ctx context.Context) (*string, error)
IsADDomainController(ctx context.Context) (bool, error)
IsEntraConnectServer() (bool, error)
EntraDomain(ctx context.Context) (*string, error)
}
func NewDomainInfoProvider ¶ added in v1.0.0
func NewDomainInfoProvider() DomainInfoProvider
type HostInfo ¶
type HostInfo struct {
AgentVersion string `json:"agent_version"`
AgentExecutablePath string `json:"agent_executable_path"`
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 NewHostInfo ¶ added in v1.0.0
func NewHostInfo( ctx context.Context, orgId string, logger hclog.Logger, sys SystemInfoProvider, domain DomainInfoProvider, ) (*HostInfo, 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 NewPathsData ¶ added in v1.0.0
func NewPathsData( ctx context.Context, orgId string, logger hclog.Logger, sys SystemInfoProvider, domain DomainInfoProvider, ) (*PathsData, error)
type RunCommandFunc ¶ added in v1.0.0
type SystemInfoProvider ¶ added in v1.0.0
type SystemInfoProvider interface {
Hostname() (string, error)
HostPlatform() (string, error)
CPUModelName() (string, error)
TotalMemoryBytes() (uint64, error)
MACAddress() (*string, error)
}
func NewSystemInfoProvider ¶ added in v1.0.0
func NewSystemInfoProvider() SystemInfoProvider
Click to show internal directories.
Click to hide internal directories.