Documentation
¶
Index ¶
- Constants
- func AgentCmd() *cobra.Command
- func DownloadPluginCmd() *cobra.Command
- func DownloadPolicyCmd() *cobra.Command
- type AgentRunner
- func (ar *AgentRunner) DownloadPlugins(ctx context.Context) error
- func (ar *AgentRunner) DownloadPolicies(ctx context.Context) error
- func (ar *AgentRunner) Run(ctx context.Context) error
- func (ar *AgentRunner) SendHeartbeat(ctx context.Context, staticAgentUUID uuid.UUID) error
- func (ar *AgentRunner) UpdateConfig(config *agentConfig)
- type DownloadRunner
- type PolicyDownloadRunner
Constants ¶
View Source
const AgentPluginDir = ".compliance-framework/plugins"
View Source
const AgentPolicyDir = ".compliance-framework/policies"
Variables ¶
This section is empty.
Functions ¶
func DownloadPluginCmd ¶
func DownloadPolicyCmd ¶
Types ¶
type AgentRunner ¶
type AgentRunner struct {
// contains filtered or unexported fields
}
func NewAgentRunner ¶ added in v0.1.3
func NewAgentRunner() *AgentRunner
func (*AgentRunner) DownloadPlugins ¶
func (ar *AgentRunner) DownloadPlugins(ctx context.Context) error
DownloadPlugins checks each item in the config and retrieves the source of the plugin building a set of unique sources. It then checks if the source is a path that exists on the filesystem, if it isn't, it will download the plugin to the filesystem.
We also update the map of plugin sources, this could be an identity map if it's a local file or maps from the URL to the local file if we downloaded a remote file.
We return any errors that occurred during the download process. TODO: What is the right error handling here?
func (*AgentRunner) DownloadPolicies ¶
func (ar *AgentRunner) DownloadPolicies(ctx context.Context) error
func (*AgentRunner) SendHeartbeat ¶ added in v0.1.3
func (*AgentRunner) UpdateConfig ¶ added in v0.1.3
func (ar *AgentRunner) UpdateConfig(config *agentConfig)
type DownloadRunner ¶
type DownloadRunner struct {
// contains filtered or unexported fields
}
type PolicyDownloadRunner ¶
type PolicyDownloadRunner struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.