olin: within.website/olin/internal/abi/dagger Index | Files

package dagger

import "within.website/olin/internal/abi/dagger"

Package dagger is the first attempt at an API for webassembly modules to communicate with the outside world. It is based on the idea of files being used as the intermediate between user modules and resources.

Consider this the first draft of Dagger, everything here is subject to change. This is going to be the experimental phase.

Index

Package Files

c.go doc.go errno_string.go error.go process.go

type Errno Uses

type Errno int

Errno is the error number for an error.

const (
    ErrorNone Errno = iota
    ErrorBadURL
    ErrorBadURLInput
    ErrorUnknownScheme
)

Error numbers

func (Errno) String Uses

func (i Errno) String() string

type Error Uses

type Error struct {
    Errno      Errno
    Underlying error
}

Error is a common error type for dagger operations.

func (Error) Error Uses

func (e Error) Error() string

type Process Uses

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

Process is a higher level wrapper around a set of files for dagger modules.

func NewProcess Uses

func NewProcess(name string) *Process

NewProcess creates a new process.

func (*Process) CloseFD Uses

func (p *Process) CloseFD(fd int64) int64

CloseFD closes a file descriptor.

func (Process) Files Uses

func (p Process) Files() []abi.File

Files returns the process' list of open files.

func (*Process) Name Uses

func (p *Process) Name() string

Name returns this process's name.

func (*Process) Open Uses

func (p *Process) Open(f abi.File)

Open makes this Process track an arbitrary extra file.

func (*Process) OpenFD Uses

func (p *Process) OpenFD(furl string, flags uint32) int64

OpenFD opens a file descriptor for this Process with the given file url string and flags integer.

func (*Process) ReadFD Uses

func (p *Process) ReadFD(fd int64, buf []byte) int64

ReadFD reads data from the given FD into the byte buffer.

func (*Process) ResolveFunc Uses

func (p *Process) ResolveFunc(module, field string) exec.FunctionImport

ResolveFunc resolves dagger's ABI and importable functions.

func (*Process) ResolveGlobal Uses

func (p *Process) ResolveGlobal(module, field string) int64

ResolveGlobal does nothing, currently.

func (*Process) SyncFD Uses

func (p *Process) SyncFD(fd int64) int64

SyncFD runs a file's sync operation and returns -1 if it failed.

func (*Process) WriteFD Uses

func (p *Process) WriteFD(fd int64, data []byte) int64

WriteFD writes the given data to a file descriptor, returning -1 if it failed somehow.

Package dagger imports 9 packages (graph). Updated 2019-06-09. Refresh now. Tools for package owners.