Documentation ¶
Overview ¶
Package bundle implements bundle downloading.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string `json:"name"` Service string `json:"service"` Polling PollingConfig `json:"polling"` }
Config represents configuration the plguin.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements bundle downloading and activation.
func (*Plugin) Register ¶
Register a lisetner to receive status updates. The name must be comparable.
func (*Plugin) Start ¶
Start runs the plugin. The plugin will periodically try to download bundles from the configured service. When a new bundle is downloaded, the data and policies are extracted and inserted into storage.
func (*Plugin) Unregister ¶
func (p *Plugin) Unregister(name interface{})
Unregister a listener to stop receiving status updates.
type PollingConfig ¶
type PollingConfig struct { MinDelaySeconds *int64 `json:"min_delay_seconds,omitempty"` // min amount of time to wait between successful poll attempts MaxDelaySeconds *int64 `json:"max_delay_seconds,omitempty"` // max amount of time to wait between poll attempts }
PollingConfig represents configuration for the plugin's polling behaviour.
type Status ¶
type Status struct { Name string `json:"name"` ActiveRevision string `json:"active_revision,omitempty"` LastSuccessfulActivation time.Time `json:"last_successful_activation,omitempty"` LastSuccessfulDownload time.Time `json:"last_successful_download,omitempty"` Code string `json:"code,omitempty"` Message string `json:"message,omitempty"` Errors []error `json:"errors,omitempty"` }
Status represents the status of the plugin.
Click to show internal directories.
Click to hide internal directories.