Documentation
¶
Overview ¶
Package cmdintegration contains common code for export, validate-config, export-onboard-data. Mainly around configuration.
Index ¶
- func AgentDelegateMinFactory(logger hclog.Logger, min AgentDelegateMinimal) func(exp expin.Export) rpcdef.Agent
- type AgentConfig
- type AgentDelegateMinimal
- type Command
- func (s *Command) CaptureShutdown()
- func (s *Command) CloseOnlyIntegrationAndHandlePanic(integration *iloader.Integration) error
- func (s *Command) OAuthNewAccessToken(exp expin.Export) (accessToken string, _ error)
- func (s *Command) OnlyIntegration() Integration
- func (s *Command) SendPauseEvent(export expin.Export, msg string, resumeDate time.Time) error
- func (s *Command) SendResumeEvent(export expin.Export, msg string) error
- func (s *Command) SetupIntegrations(agentDelegates func(ind expin.Export) rpcdef.Agent) error
- type Integration
- type Opts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentDelegateMinFactory ¶
Types ¶
type AgentConfig ¶
type AgentConfig struct {
CustomerID string `json:"customer_id"`
PinpointRoot string `json:"pinpoint_root"`
// SkipGit is a flag for skipping git repo cloning, ripsrc processing, useful when developing
SkipGit bool `json:"skip_git"`
// IntegrationsDir is a custom location of the integrations binaries
IntegrationsDir string `json:"integrations_dir"`
// DevUseCompiledIntegrations set to true to use compiled integrations in dev build. They are used by default in prod builds.
DevUseCompiledIntegrations bool `json:"dev_use_compiled_integrations"`
Backend struct {
// Enable enables calls to pinpoint backend. It is disabled by default, but is required for the following features:
// - sending progress data to backend
// - using OAuth with refresh token
Enable bool `json:"enable"`
// ExportJobID is passed to backend in progress event
ExportJobID string `json:"export_job_id"`
} `json:"backend"`
}
type AgentDelegateMinimal ¶
type Command ¶
type Command struct {
Opts Opts
Logger hclog.Logger
StartTime time.Time
Locs fsconf.Locs
Integrations map[expin.Export]Integration
EnrollConf agentconf.Config
Deviceinfo deviceinfo.CommonInfo
// contains filtered or unexported fields
}
func NewCommand ¶
func (*Command) CaptureShutdown ¶
func (s *Command) CaptureShutdown()
func (*Command) CloseOnlyIntegrationAndHandlePanic ¶
func (s *Command) CloseOnlyIntegrationAndHandlePanic(integration *iloader.Integration) error
func (*Command) OAuthNewAccessToken ¶
func (*Command) OnlyIntegration ¶
func (s *Command) OnlyIntegration() Integration
func (*Command) SendPauseEvent ¶
func (*Command) SendResumeEvent ¶
type Integration ¶
type Integration struct {
Export expin.Export
ExportConfig rpcdef.ExportConfig
// OAuthRefreshTokens contains refresh token for integrations
// using OAuth. These are allow getting new access tokens using
// pinpoint backend. Do not pass them to integrations, these are handled in agent instead.
OauthRefreshToken string
ILoader *iloader.Integration
}
type Opts ¶
type Opts struct {
Logger hclog.Logger
AgentConfig AgentConfig
Integrations []inconfig.Integration
}
Click to show internal directories.
Click to hide internal directories.