Documentation
¶
Index ¶
- Variables
- func GetImageSource(v string) string
- func GetTedgeConfig(property string) (string, error)
- type Cli
- func (c *Cli) DeleteFromCloud() bool
- func (c *Cli) DeleteLegacyService() bool
- func (c *Cli) DeleteOrphans() bool
- func (c *Cli) EngineEventsEnabled() bool
- func (c *Cli) GetBool(key string) bool
- func (c *Cli) GetCAFile() string
- func (c *Cli) GetCertificateFile() string
- func (c *Cli) GetContainerClientOptions() []container.Opt
- func (c *Cli) GetContainerHost() string
- func (c *Cli) GetContainerRepositoryCredentialsFunc(imageRef string) func(ctx context.Context, attempt int) (string, error)
- func (c *Cli) GetCrashLoopThreshold() int
- func (c *Cli) GetCredentialsFromScript(ctx context.Context, script string, args ...string) (RepositoryAuth, error)
- func (c *Cli) GetCumulocityHost() string
- func (c *Cli) GetCumulocityPort() uint16
- func (c *Cli) GetDeviceID() string
- func (c *Cli) GetDeviceTarget() tedge.Target
- func (c *Cli) GetFilterOptions() container.FilterOptions
- func (c *Cli) GetHTTPHost() string
- func (c *Cli) GetHTTPPort() uint16
- func (c *Cli) GetKeyFile() string
- func (c *Cli) GetMQTTHost() string
- func (c *Cli) GetMQTTPort() uint16
- func (c *Cli) GetMetricsInterval() time.Duration
- func (c *Cli) GetOrphansCheckInterval() time.Duration
- func (c *Cli) GetReconcileInterval() time.Duration
- func (c *Cli) GetRegistryCredentials(url string) RepositoryAuth
- func (c *Cli) GetRegistryCredentialsPath() string
- func (c *Cli) GetServiceName() string
- func (c *Cli) GetSharedContainerNetwork() string
- func (c *Cli) GetString(key string) string
- func (c *Cli) GetSyncRetryInterval() time.Duration
- func (c *Cli) GetTopicID() string
- func (c *Cli) GetTopicRoot() string
- func (c *Cli) ImageAlwaysPull() bool
- func (c *Cli) MetricsEnabled() bool
- func (c *Cli) OnInit()
- func (c *Cli) PersistentDir(check_writable bool) (string, error)
- func (c *Cli) PrintConfig()
- func (c *Cli) UseModuleNameForService() bool
- type ExitCodeError
- type RepositoryAuth
Constants ¶
This section is empty.
Variables ¶
var LinuxConfigFilePath = "/etc/tedge/plugins/tedge-container-plugin.toml"
Functions ¶
func GetImageSource ¶
func GetTedgeConfig ¶
Types ¶
type Cli ¶
type Cli struct {
ConfigFile string
}
func (*Cli) DeleteFromCloud ¶
func (*Cli) DeleteLegacyService ¶
func (*Cli) DeleteOrphans ¶
func (*Cli) EngineEventsEnabled ¶
func (*Cli) GetCertificateFile ¶
func (*Cli) GetContainerClientOptions ¶
func (*Cli) GetContainerHost ¶
GetContainerHost get the container engine's host configuration (if manually defined by the user)
func (*Cli) GetContainerRepositoryCredentialsFunc ¶
func (*Cli) GetCrashLoopThreshold ¶
func (*Cli) GetCredentialsFromScript ¶
func (*Cli) GetCumulocityHost ¶
func (*Cli) GetCumulocityPort ¶
func (*Cli) GetDeviceID ¶
func (*Cli) GetDeviceTarget ¶
func (*Cli) GetFilterOptions ¶
func (c *Cli) GetFilterOptions() container.FilterOptions
func (*Cli) GetHTTPHost ¶
func (*Cli) GetHTTPPort ¶
func (*Cli) GetKeyFile ¶
func (*Cli) GetMQTTHost ¶
func (*Cli) GetMQTTPort ¶
func (*Cli) GetMetricsInterval ¶
func (*Cli) GetOrphansCheckInterval ¶
GetOrphansCheckInterval returns the minimum time between routine checks for orphaned cloud services. The check costs additional Cumulocity REST calls on each update, so it is rate limited (the interval is bypassed when an update removed stale services, when new orphans are likely). A value of 0 (or less) checks on every update.
func (*Cli) GetReconcileInterval ¶
GetReconcileInterval returns how often the full container state should be reconciled with thin-edge.io and the cloud, independently of container engine events or MQTT messages. The reconcile loop is a safety net which retries pending cloud deletions and removes stale/orphaned services even when the event that should have triggered the cleanup was lost (e.g. the bridge-online message was missed due to retained message loss). A value of 0 (or less) disables the reconcile loop.
func (*Cli) GetRegistryCredentials ¶
func (c *Cli) GetRegistryCredentials(url string) RepositoryAuth
func (*Cli) GetRegistryCredentialsPath ¶
func (*Cli) GetServiceName ¶
func (*Cli) GetSharedContainerNetwork ¶
func (*Cli) GetSyncRetryInterval ¶
GetSyncRetryInterval returns the delay before a failed cloud sync is retried, e.g. a pending cloud service deletion which failed because the local Cumulocity proxy was unavailable. The retry is scheduled by the plugin itself so pending operations recover even when no container engine event or bridge health message arrives to trigger an update. A value of 0 (or less) disables the failure-driven retry.
func (*Cli) GetTopicID ¶
func (*Cli) GetTopicRoot ¶
func (*Cli) ImageAlwaysPull ¶
func (*Cli) MetricsEnabled ¶
func (*Cli) PrintConfig ¶
func (c *Cli) PrintConfig()
func (*Cli) UseModuleNameForService ¶
type ExitCodeError ¶
func NewExitCodeError ¶
func NewExitCodeError(err error) *ExitCodeError
func (ExitCodeError) Error ¶
func (e ExitCodeError) Error() string
func (ExitCodeError) ExitCode ¶
func (e ExitCodeError) ExitCode() int
type RepositoryAuth ¶
type RepositoryAuth struct {
URL string
Username string `json:"username"`
Password string `json:"password"`
}
func (*RepositoryAuth) IsSet ¶
func (a *RepositoryAuth) IsSet() bool