Full Mattermost server source with integrated Community Enterprise features. Includes vendor directory for offline/air-gapped builds. Structure: - enterprise-impl/: Enterprise feature implementations - enterprise-community/: Init files that register implementations - enterprise/: Bridge imports (community_imports.go) - vendor/: All dependencies for offline builds Build (online): go build ./cmd/mattermost Build (offline/air-gapped): go build -mod=vendor ./cmd/mattermost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
564 B
Go
31 lines
564 B
Go
package pluginapi
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
var backoffTimeouts = []time.Duration{
|
|
50 * time.Millisecond,
|
|
100 * time.Millisecond,
|
|
200 * time.Millisecond,
|
|
200 * time.Millisecond,
|
|
400 * time.Millisecond,
|
|
400 * time.Millisecond,
|
|
}
|
|
|
|
// progressiveRetry executes a BackoffOperation and waits an increasing time before retrying the operation.
|
|
func progressiveRetry(operation func() error) error {
|
|
var err error
|
|
|
|
for attempts := range backoffTimeouts {
|
|
err = operation()
|
|
if err == nil {
|
|
return nil
|
|
}
|
|
|
|
time.Sleep(backoffTimeouts[attempts])
|
|
}
|
|
|
|
return err
|
|
}
|