Documentation
¶
Index ¶
- type FeaturesProfile
- type Manager
- func (m *Manager) CreateDefaultProfiles(serviceName string) (*ServiceProfiles, error)
- func (m *Manager) DeleteProfiles(serviceName string) error
- func (m *Manager) EnsureProfilesDir() error
- func (m *Manager) GetProfile(serviceName, profileName string) (*Profile, error)
- func (m *Manager) GetProfilesDir() string
- func (m *Manager) GetServiceProfiles(serviceName string) (*ServiceProfiles, error)
- func (m *Manager) HasProfiles(serviceName string) bool
- func (m *Manager) ListAllServices() ([]string, error)
- func (m *Manager) ListProfiles(serviceName string) ([]string, error)
- func (m *Manager) SaveServiceProfiles(profiles *ServiceProfiles) error
- type Profile
- type ProfileType
- type ResourceProfile
- type ServiceProfiles
- type VolumeProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeaturesProfile ¶
type FeaturesProfile struct {
Debug bool `toml:"debug"`
SSL bool `toml:"ssl"`
Logging bool `toml:"logging"`
Metrics bool `toml:"metrics"`
HealthCheck bool `toml:"health_check"`
AutoRestart bool `toml:"auto_restart"`
ResourceLimits bool `toml:"resource_limits"`
}
FeaturesProfile defines feature flags for a profile
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles service profile operations
func (*Manager) CreateDefaultProfiles ¶
func (m *Manager) CreateDefaultProfiles(serviceName string) (*ServiceProfiles, error)
CreateDefaultProfiles creates default development and production profiles for a service
func (*Manager) DeleteProfiles ¶
DeleteProfiles removes profiles for a service
func (*Manager) EnsureProfilesDir ¶
EnsureProfilesDir creates the profiles directory if it doesn't exist
func (*Manager) GetProfile ¶
GetProfile gets a specific profile for a service
func (*Manager) GetProfilesDir ¶
GetProfilesDir returns the profiles directory path
func (*Manager) GetServiceProfiles ¶
func (m *Manager) GetServiceProfiles(serviceName string) (*ServiceProfiles, error)
GetServiceProfiles loads profiles for a specific service
func (*Manager) HasProfiles ¶
HasProfiles checks if a service has profiles defined
func (*Manager) ListAllServices ¶
ListAllServices returns all services that have profiles defined
func (*Manager) ListProfiles ¶
ListProfiles returns all profiles for a service
func (*Manager) SaveServiceProfiles ¶
func (m *Manager) SaveServiceProfiles(profiles *ServiceProfiles) error
SaveServiceProfiles saves profiles for a specific service
type Profile ¶
type Profile struct {
Name string `toml:"name"`
Type ProfileType `toml:"type"`
Description string `toml:"description"`
Environment map[string]string `toml:"environment"`
Resources ResourceProfile `toml:"resources"`
Volumes []VolumeProfile `toml:"volumes"`
Replicas int `toml:"replicas"`
Features FeaturesProfile `toml:"features"`
}
Profile represents a service configuration profile
func GetDevelopmentProfile ¶
GetDevelopmentProfile returns a default development profile
func GetProductionProfile ¶
GetProductionProfile returns a default production profile
type ProfileType ¶
type ProfileType string
ProfileType represents the type of profile
const ( ProfileDevelopment ProfileType = "development" ProfileProduction ProfileType = "production" ProfileCustom ProfileType = "custom" )
type ResourceProfile ¶
type ResourceProfile struct {
MemoryLimit string `toml:"memory_limit"`
MemoryMin string `toml:"memory_min"`
CPULimit string `toml:"cpu_limit"`
CPUMin string `toml:"cpu_min"`
}
ResourceProfile defines resource allocation for a profile