oci

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUid = 1000
	DefaultGid = 1000
)

Variables

This section is empty.

Functions

func IsSupported added in v0.45.0

func IsSupported(runtime string) bool

IsSupported is for UX.

Types

type BuildErr

type BuildErr struct {
	Err error
}

BuildErr indicates a general build error occurred.

func (BuildErr) Error

func (e BuildErr) Error() string

type Builder

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

func NewBuilder

func NewBuilder(name string, verbose bool) *Builder

NewBuilder creates a builder instance.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, f fn.Function, pp []fn.Platform) (err error)

Build an OCI image of the given Function, wrapped in a service which exposes the function as a network service.

Platforms are optional and default to fn.DefaultPlatforms.

type Credentials added in v0.47.0

type Credentials struct {
	Username string
	Password string
}

func EmptyCredentialsProvider added in v0.47.0

func EmptyCredentialsProvider(ctx context.Context, registry string) (Credentials, error)

type CredentialsProvider added in v0.47.0

type CredentialsProvider func(ctx context.Context, image string) (Credentials, error)

type ErrBuildInProgress

type ErrBuildInProgress struct {
	Dir string
}

func (ErrBuildInProgress) Error

func (e ErrBuildInProgress) Error() string

type Opt added in v0.47.0

type Opt func(*Pusher)

func WithCredentialsProvider added in v0.47.0

func WithCredentialsProvider(cp CredentialsProvider) Opt

func WithTransport added in v0.47.0

func WithTransport(transport http.RoundTripper) Opt

func WithVerbose added in v0.47.0

func WithVerbose(verbose bool) Opt

type Pusher

type Pusher struct {
	Anonymous bool

	Insecure bool
	Token    string
	Username string
	Verbose  bool
	// contains filtered or unexported fields
}

Pusher of OCI multi-arch layout directories.

func NewPusher

func NewPusher(insecure, anon, verbose bool, opts ...Opt) *Pusher

func (*Pusher) Push

func (p *Pusher) Push(ctx context.Context, f fn.Function) (digest string, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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