cache

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Copyright 2025 Cloudbase Solutions SRL

Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.

Index

Constants

View Source
const (
	// GiteaRunnerReleasesURL is the public API URL that returns a json of all Gitea runner releases.
	// By default it returns the last 10 releases, which is enough for our needs.
	GiteaRunnerReleasesURL = "https://gitea.com/api/v1/repos/gitea/act_runner/releases"
	// GiteaRunnerMinimumVersion is the minimum version we need in order to support ephemeral runners.
	GiteaRunnerMinimumVersion = "v0.2.12"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GiteaEntityTool

type GiteaEntityTool struct {
	// TagName is the semver version of the release.
	TagName    string             `json:"tag_name"`
	Name       string             `json:"name"`
	TarballURL string             `json:"tarball_url"`
	Assets     []GiteaToolsAssets `json:"assets"`
}

type GiteaEntityTools

type GiteaEntityTools []GiteaEntityTool

func (GiteaEntityTools) GetLatestVersion

func (g GiteaEntityTools) GetLatestVersion() string

func (GiteaEntityTools) MinimumVersion

func (g GiteaEntityTools) MinimumVersion() (GiteaEntityTool, bool)

type GiteaToolsAssets

type GiteaToolsAssets struct {
	ID            uint      `json:"id"`
	Name          string    `json:"name"`
	Size          uint      `json:"size"`
	DownloadCount uint      `json:"download_count"`
	CreatedAt     time.Time `json:"created_at"`
	UUID          string    `json:"uuid"`
	DownloadURL   string    `json:"browser_download_url"`
}

func (GiteaToolsAssets) GetArch

func (g GiteaToolsAssets) GetArch() (*string, error)

func (GiteaToolsAssets) GetOS

func (g GiteaToolsAssets) GetOS() (*string, error)

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(ctx context.Context, store common.Store) *Worker

func (*Worker) Start

func (w *Worker) Start() error

func (*Worker) Stop

func (w *Worker) Stop() error

Jump to

Keyboard shortcuts

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