envoy

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
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

func (m *Manager) GetDownloadedVersions() ([]string, error)

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

func (*Manager) SetVersion

func (m *Manager) SetVersion(version string, forceDownload bool) (string, error)

SetVersion downloads and installs a specific version

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL