Documentation
¶
Index ¶
Constants ¶
View Source
const CogWheelEnvVar = "COG_WHEEL"
CogWheelEnvVar is the environment variable name for wheel selection
Variables ¶
This section is empty.
Functions ¶
func ReadCogDataclassWheel ¶
ReadCogDataclassWheel returns the embedded cog-dataclass wheel.
func ReadCogWheel ¶
Types ¶
type WheelConfig ¶
type WheelConfig struct {
// Source indicates where the wheel comes from
Source WheelSource
// URL is set when Source is WheelSourceURL
URL string
// Path is set when Source is WheelSourceFile
Path string
}
WheelConfig represents the configuration for which wheel to install
func GetWheelConfig ¶
func GetWheelConfig(cogRuntimeEnabled bool) *WheelConfig
GetWheelConfig returns the WheelConfig based on COG_WHEEL env var and cog_runtime flag. Priority:
- COG_WHEEL env var (if set, overrides everything)
- cog_runtime: true -> coglet-alpha (PinnedCogletURL)
- cog_runtime: false (default) -> embedded cog wheel
func ParseCogWheel ¶
func ParseCogWheel(value string) *WheelConfig
ParseCogWheel parses a COG_WHEEL value and returns the appropriate WheelConfig. Supported values:
- "cog" - Embedded cog wheel
- "coglet" - Embedded coglet wheel
- "coglet-alpha" - PinnedCogletURL
- "cog-dataclass" - Embedded cog-dataclass wheel (pydantic-less)
- "https://..." or "http://..." - Direct wheel URL
- "/path/to/file.whl" or "./path/to/file.whl" - Local wheel file
Returns nil if the value is empty (caller should use defaults).
type WheelSource ¶
type WheelSource int
WheelSource represents the source type for the wheel to install
const ( // WheelSourceCog uses the embedded cog wheel (default when cog_runtime: false) WheelSourceCog WheelSource = iota // WheelSourceCogletEmbedded uses the embedded coglet wheel WheelSourceCogletEmbedded // WheelSourceCogletAlpha uses the PinnedCogletURL (default when cog_runtime: true) WheelSourceCogletAlpha // WheelSourceCogDataclass uses the embedded cog-dataclass wheel (pydantic-less) WheelSourceCogDataclass // WheelSourceURL uses a custom URL WheelSourceURL // WheelSourceFile uses a local file path WheelSourceFile )
func (WheelSource) String ¶
func (s WheelSource) String() string
String returns the string representation of the WheelSource
Click to show internal directories.
Click to hide internal directories.