model

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ConfigMediaType  = "application/vnd.module.wasm.config.v1+json"
	ContentMediaType = "application/vnd.module.wasm.content.layer.v1+wasm"
)

media types stored in a Wasm Module image

View Source
const (
	ConfigFilename = "runtime-config.json"
	CodeFilename   = "filter.wasm"
)

default filenames stored in a Wasm Module Image

Variables

This section is empty.

Functions

func FullRef

func FullRef(ref string) (string, error)

expand the ref to contain :latest suffix if no tag provided

func GetDescriptor

func GetDescriptor(filter Filter) (ocispec.Descriptor, error)

helper function to get the descriptor for a wasm binary

Types

type Filter

type Filter io.Reader

a reader with access to the filter code

type Image

type Image interface {
	// ref to the image
	Ref() string

	// get the descriptor for the module layer
	Descriptor() (ocispec.Descriptor, error)

	// get the filter .wasm file from the image
	FetchFilter(ctx context.Context) (Filter, error)

	// get the filter config from the image
	FetchConfig(ctx context.Context) (*config.Runtime, error)
}

represents the descriptors for an image, as well as accessors to the image contents

type Runtime added in v0.0.13

type Runtime struct {
	Type       RuntimeType
	AbiVersion string
}

a WASM Module Runtime

type RuntimeType added in v0.0.13

type RuntimeType string
const (
	Runtime_EnvoyProxy RuntimeType = "envoy_proxy"
)

Jump to

Keyboard shortcuts

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