package constants

import "time"

// Application-wide constants
const (
	// Health check configuration
	MaxHealthCheckRetries    = 10
	HealthCheckRetryInterval = 200 * time.Millisecond
	HealthCheckTimeout       = 5 * time.Second

	// Server configuration
	DefaultPort             = "8080"
	GracefulShutdownTimeout = 5 * time.Second

	// Load generator configuration
	MillisecondsPerMinute = 60000
	LoadGenStartupDelay   = 100 * time.Millisecond

	// Telemetry configuration
	DefaultLogBufferSize = 1000
	DefaultStatsInterval = 2 * time.Second

	// Proxy configuration
	InstrumentInterval     = 2 * time.Second
	ProxyPort              = 9000
	ShardOfflineTimeout    = 5 * time.Second
	RollingReleaseDelay    = 5 * time.Second
	MaxNetworkDelayMs      = 5
	DeploymentWaitTime     = 30 * time.Second
	ProcessMonitorInterval = 2 * time.Second
	MaxRestartAttempts     = 5
	RestartBackoffMax      = 10 * time.Second
)

// Note store identifier constants
const (
	// LegacyNoteStore represents the initial note store
	LegacyNoteStore = "legacy"

	// NewNoteStore represents the note store for the first exercise
	NewNoteStore = "new"

	// SecondShardStore represents the note store for the second exercise
	SecondShardStore = "second"
)

// Shards lists the available shards for cycling through in the UI. This does not include the legacy store.
var Shards = []string{
	NewNoteStore,
	SecondShardStore,
}
