fan

package
v0.0.0-...-3817f6d Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(u string) (string, error)

func FetchToPath

func FetchToPath(u string, path string) (string, error)

todo: check content-type header todo: add authentication stuff (certs)

Types

type Target

type Target struct {
	Url string `yaml:"url"`

	// InvalidateAfter is the amount of time the target should remain in the cache before being removed.
	InvalidateAfter time.Duration `yaml:"invalidate_after"`

	CachedAt time.Time `yaml:"cached_at"`

	// Path is the on-disk path to the target executable.
	Path string `yaml:"path,omitempty"`
}

func (Target) Hash

func (t Target) Hash() uint64

func (Target) Run

func (t Target) Run(ctx context.Context, args []string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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