registry

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlwaysPullPolicy       PullPolicy = "always"
	IfNotPresentPullPolicy            = "if-not-present"
	NeverPullPolicy                   = "never"
)
View Source
const (
	DefaultOrganization = "scale"
)

Variables

View Source
var (
	ErrHashMismatch   = errors.New("hash mismatch")
	ErrNoFunction     = errors.New("function does not exist locally and pull policy does not allow pulling from registry")
	ErrDownloadFailed = errors.New("scale function could not be pull from the registry")
)
View Source
var (
	DefaultCookieURL = &url.URL{
		Scheme: "https",
		Host:   "scale.sh",
	}
)

Functions

func Download added in v0.3.12

func Download(name string, tag string, opts ...Option) (*scalefunc.ScaleFunc, error)

Types

type Option

type Option func(config *config)

func WithAPIKey

func WithAPIKey(apiKey string) Option

func WithBaseURL

func WithBaseURL(baseURL string) Option

func WithCacheDirectory

func WithCacheDirectory(cacheDirectory string) Option

func WithClient added in v0.3.8

func WithClient(client *client.ScaleAPIV1) Option

func WithCookieURL

func WithCookieURL(cookieURL *url.URL) Option

func WithOrganization

func WithOrganization(organization string) Option

func WithPullPolicy

func WithPullPolicy(pullPolicy PullPolicy) Option

func WithStorage added in v0.3.9

func WithStorage(st *storage.Storage) Option

type PullPolicy

type PullPolicy string

Jump to

Keyboard shortcuts

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