common

package
v2.1.2+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const AgentSvcName = "PaletteInsightAgent"

Constants

View Source
const InsightApiVersion = "v1"
View Source
const SplunkServerAddress = "diagnostics.palette-software.com"
View Source
const WatchdogSplunkToken = "705293B1-BDBA-486B-92D2-6BA3A542F6D7"
View Source
const WatchdogSvcDescription = "Manager for Palette Insight Agent"
View Source
const WatchdogSvcDisplayName = "Palette Insight Watchdog"
View Source
const WatchdogSvcName = "PaletteInsightWatchdog"

Variables

This section is empty.

Functions

func FindAgentConfigFile

func FindAgentConfigFile(baseFolder string) (string, error)

FIXME: locating the config file is not generic! This means this way is not going to be okay if we wanted to use this service as an auto-updater for the insight-server NOTE: This only works as long as the watchdog service runs from the very same folder as the agent. But they are supposed to be in the same folder by design.

func GetLicenseData

func GetLicenseData(baseFolder string) (*insight_server.LicenseData, error)

func GetLicenseDataForConfig

func GetLicenseDataForConfig(config Config) (*insight_server.LicenseData, error)

Types

type ApiClient

type ApiClient struct {
	// contains filtered or unexported fields
}

func NewApiClient

func NewApiClient(baseFolder string) (*ApiClient, error)

func NewApiClientWithConfig

func NewApiClientWithConfig(config Config) (*ApiClient, error)

func (*ApiClient) DownloadFile

func (c *ApiClient) DownloadFile(endpoint, destinationPath string) error

func (*ApiClient) Get

func (c *ApiClient) Get(endpoint string) (*http.Response, error)

func (*ApiClient) UploadFile

func (c *ApiClient) UploadFile(endpoint, sourcePath string) error

type Config

type Config struct {
	LicenseKey string     `yaml:"LicenseKey"`
	Webservice Webservice `yaml:"Webservice"`
}

func ParseAgentConfig

func ParseAgentConfig(baseFolder string) (Config, error)

func ParseConfig

func ParseConfig(configFilePath string) (Config, error)

type Webservice

type Webservice struct {
	Endpoint     string `yaml:"Endpoint"`
	UseProxy     bool   `yaml:"UseProxy"`
	ProxyAddress string `yaml:"ProxyAddress"`
}

Jump to

Keyboard shortcuts

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