Documentation
¶
Index ¶
- Constants
- Variables
- func Download(name string, tag string, opts ...Option) (*scalefunc.ScaleFunc, error)
- type Option
- func WithAPIKey(apiKey string) Option
- func WithBaseURL(baseURL string) Option
- func WithCacheDirectory(cacheDirectory string) Option
- func WithClient(client *client.ScaleAPIV1) Option
- func WithCookieURL(cookieURL *url.URL) Option
- func WithOrganization(organization string) Option
- func WithPullPolicy(pullPolicy PullPolicy) Option
- func WithStorage(st *storage.Storage) Option
- type PullPolicy
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 ¶
Types ¶
type Option ¶
type Option func(config *config)
func WithAPIKey ¶
func WithBaseURL ¶
func WithCacheDirectory ¶
func WithClient ¶ added in v0.3.8
func WithClient(client *client.ScaleAPIV1) Option
func WithCookieURL ¶
func WithOrganization ¶
func WithPullPolicy ¶
func WithPullPolicy(pullPolicy PullPolicy) Option
func WithStorage ¶ added in v0.3.9
type PullPolicy ¶
type PullPolicy string
Click to show internal directories.
Click to hide internal directories.