Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitJWTRsaKey ¶
func InitJWTRsaKey(config JWTConfig) (*rsa.PrivateKey, error)
InitJWTRsaKey initializes RSA private key for JWT authentication
Types ¶
type Config ¶
type Config struct {
Server ServerConfig `json:"server"`
Logging LoggingConfig `json:"logging"`
Strategies StrategiesConfig `json:"strategies"`
JWT JWTConfig `json:"jwt"`
}
Config represents the application configuration
func LoadConfig ¶
LoadConfig loads configuration from file or returns default config
type JWTConfig ¶
type JWTConfig struct {
PrivateKeyPath string `json:"private_key_path"`
TokenDuration int `json:"token_duration"` // Token duration in hours
}
JWTConfig represents JWT authentication configuration
type LabelSelector ¶
type LabelSelector struct {
Key string `json:"key"` // Label key
Value string `json:"value"` // Label value
}
LabelSelector represents a key-value pair for pod label selection
type LoggingConfig ¶
LoggingConfig represents logging configuration
type SchedulingStrategy ¶
type SchedulingStrategy struct {
Priority bool `json:"priority"` // If true, set vtime to minimum vtime
ExecutionTime uint64 `json:"execution_time"` // Time slice for this process in nanoseconds
PID int `json:"pid,omitempty"` // Process ID to apply this strategy to
Selectors []LabelSelector `json:"selectors,omitempty"` // Label selectors to match pods
CommandRegex string `json:"command_regex,omitempty"` // Regex to match process command
}
SchedulingStrategy represents a strategy for process scheduling
type ServerConfig ¶
type ServerConfig struct {
Port string `json:"port"`
ReadTimeout int `json:"read_timeout"`
WriteTimeout int `json:"write_timeout"`
IdleTimeout int `json:"idle_timeout"`
}
ServerConfig represents server-specific configuration
type StrategiesConfig ¶
type StrategiesConfig struct {
Default []SchedulingStrategy `json:"default"`
}
StrategiesConfig represents scheduling strategies configuration
Click to show internal directories.
Click to hide internal directories.