model

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

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