oci

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 29 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
	Token    string
}

func EmptyCredentialsProvider added in v0.47.0

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

func (Credentials) Authorization added in v0.47.1

func (c Credentials) Authorization() (*authn.AuthConfig, error)

type CredentialsProvider added in v0.47.0

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

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
	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)

type Scaffolder added in v0.48.0

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

Scaffolder for host (OCI) builder

func NewScaffolder added in v0.48.0

func NewScaffolder(verbose bool) *Scaffolder

func (Scaffolder) Scaffold added in v0.48.0

func (s Scaffolder) Scaffold(ctx context.Context, f fn.Function, path string) error

Scaffold the function so that it can be built via oci builder. 'path' is an optional override. Assign "" (empty string) most of the time

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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