Documentation
¶
Index ¶
Constants ¶
const ( DefaultBaseDir = "/var/lib/elchi/envoys" ArchiveURL = "https://archive.elchi.io/index.json" DefaultArch = "linux-amd64" DownloadTimeout = 300 // 5 minutes )
Constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveBinary ¶
type ArchiveBinary struct {
Arch string `json:"arch"`
DownloadURL string `json:"download_url"`
SHA256 string `json:"sha256"`
}
ArchiveBinary represents a binary download info
type ArchiveRelease ¶
type ArchiveRelease struct {
Version string `json:"version"`
Date time.Time `json:"date"`
Binaries []ArchiveBinary `json:"binaries"`
}
ArchiveRelease represents a single release from the archive API
type ArchiveResponse ¶
type ArchiveResponse struct {
Releases []ArchiveRelease `json:"releases"`
}
ArchiveResponse represents the full response from archive API
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
func NewDownloader() *Downloader
func (*Downloader) DownloadBinary ¶
func (d *Downloader) DownloadBinary(version string, destPath string) error
DownloadBinary downloads a binary for the given version and architecture
func (*Downloader) GetAvailableVersions ¶
func (d *Downloader) GetAvailableVersions() (*ArchiveResponse, error)
GetAvailableVersions fetches available versions from archive API
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) GetDownloadedVersions ¶
GetDownloadedVersions returns list of locally downloaded versions
func (*Manager) ProcessEnvoyVersionCommand ¶
func (m *Manager) ProcessEnvoyVersionCommand(request *client.RequestEnvoyVersion) *client.ResponseEnvoyVersion
ProcessEnvoyVersionCommand handles the envoy version command
type PermissionManager ¶
type PermissionManager struct {
// contains filtered or unexported fields
}
func NewPermissionManager ¶
func NewPermissionManager() *PermissionManager
func (*PermissionManager) CreateVersionDirectory ¶
func (pm *PermissionManager) CreateVersionDirectory(version string) (string, error)
CreateVersionDirectory creates directory structure for a version
func (*PermissionManager) EnsureBaseDirectory ¶
func (pm *PermissionManager) EnsureBaseDirectory() error
EnsureBaseDirectory ensures the base envoy directory exists with proper permissions
func (*PermissionManager) SetBinaryPermissions ¶
func (pm *PermissionManager) SetBinaryPermissions(binaryPath string) error
SetBinaryPermissions sets proper permissions for binary