fileproxy

package
v0.0.0-...-566b0a1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIsNotRegularFile = errors.New("not a regular File")
	ErrNotImplemented   = errors.New("not implemented")
	ErrFileNotFound     = errors.New("file not found")
)
View Source
var Kube kube = ""

Functions

This section is empty.

Types

type Endpoint

type Endpoint interface {
	FileURL(string, string) (string, error)
	HashFileURL(string, string) (string, error)
	LastTag() (string, error)
}

type Github

type Github struct {
	Owner    string
	Repo     string
	File     func(string) string
	HashFile func(string) string
}

func (Github) FileURL

func (gh Github) FileURL(_, tag string) (string, error)

func (Github) HashFileURL

func (gh Github) HashFileURL(_, tag string) (string, error)

func (Github) LastTag

func (gh Github) LastTag() (string, error)

type Proxy

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

func NewProxy

func NewProxy(cfg *config.Config) *Proxy

func (*Proxy) Handler

func (p *Proxy) Handler(endp Endpoint) http.HandlerFunc

Handler handle request url /binary-name[/version] /coredns/v1.10.0 -> pattern - /coredns/ /etcd/v3.14.5 -> pattern - /etcd/ /kubectl/v1.31.1 -> pattern - /

type Semaphore

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

func NewSemaphore

func NewSemaphore() *Semaphore

func (*Semaphore) Acquire

func (s *Semaphore) Acquire(key string)

func (*Semaphore) Release

func (s *Semaphore) Release(key string)

Jump to

Keyboard shortcuts

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