Documentation ¶
Overview ¶
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
Index ¶
- type ContextKey
- type Package
- type PullOption
- func WithPullArchitecture(archs ...string) PullOption
- func WithPullCache(cache bool) PullOption
- func WithPullChecksum(calc bool) PullOption
- func WithPullPlatform(plats ...string) PullOption
- func WithPullProgressFunc(onProgress func(progress float64)) PullOption
- func WithPullVersion(version string) PullOption
- func WithPullWorkdir(workdir string) PullOption
- type PullOptions
- type PushOption
- type PushOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextKey ¶
type ContextKey string
type Package ¶
type Package interface { unikraft.Nameable // Metadata returns any additional metadata associated with this package. Metadata() any // Push the package to a remotely retrievable destination. Push(context.Context, ...PushOption) error // Pull retreives the package from a remotely retrievable location. Pull(context.Context, ...PullOption) error // Format returns the name of the implementation. Format() string }
type PullOption ¶ added in v0.4.0
type PullOption func(opts *PullOptions) error
PullOption is an option function which is used to modify PullOptions.
func WithPullArchitecture ¶
func WithPullArchitecture(archs ...string) PullOption
WithPullArchitecture requests a given architecture (if applicable)
func WithPullCache ¶
func WithPullCache(cache bool) PullOption
WithPullCache to set whether use cache if possible.
func WithPullChecksum ¶
func WithPullChecksum(calc bool) PullOption
WithPullChecksum to set whether to calculate and compare the checksum of the package.
func WithPullPlatform ¶
func WithPullPlatform(plats ...string) PullOption
WithPullPlatform requests a given platform (if applicable).
func WithPullProgressFunc ¶
func WithPullProgressFunc(onProgress func(progress float64)) PullOption
WithPullProgressFunc set an optional progress function which is used as a callback during the transmission of the package and the host.
func WithPullVersion ¶ added in v0.4.0
func WithPullVersion(version string) PullOption
WithPullVersion sets the version that should be pulled.
func WithPullWorkdir ¶
func WithPullWorkdir(workdir string) PullOption
WithPullWorkdir set the working directory context of the pull such that the resources of the package are placed there appropriately.
type PullOptions ¶ added in v0.4.0
type PullOptions struct {
// contains filtered or unexported fields
}
PullOptions contains the list of options which can be set for pulling a package.
func NewPullOptions ¶ added in v0.4.0
func NewPullOptions(opts ...PullOption) (*PullOptions, error)
NewPullOptions creates PullOptions
func (*PullOptions) CalculateChecksum ¶ added in v0.4.0
func (ppo *PullOptions) CalculateChecksum() bool
CalculateChecksum returns whether the pull request should perform a check of the resource sum.
func (*PullOptions) OnProgress ¶ added in v0.4.0
func (ppo *PullOptions) OnProgress(progress float64)
OnProgress calls (if set) an embedded progress function which can be used to update an external progress bar, for example.
func (*PullOptions) UseCache ¶ added in v0.4.0
func (ppo *PullOptions) UseCache() bool
UseCache returns whether the pull should redirect to using a local cache if available.
func (*PullOptions) Version ¶ added in v0.4.0
func (ppo *PullOptions) Version() string
Version returns
func (*PullOptions) Workdir ¶ added in v0.4.0
func (ppo *PullOptions) Workdir() string
Workdir returns the set working directory as part of the pull request
type PushOption ¶ added in v0.4.0
type PushOption func(*PushOptions)
PushOption is an option function which is used to modify PushOptions.
type PushOptions ¶ added in v0.4.0
type PushOptions struct{}
PushOptions contains the list of options which can be set whilst pushing a package.