isolate

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package isolate provides a safe sandbox on Linux using the "isolate" program.

The use of this sandbox requires "isolate" (https://github.com/ioi/isolate) to be installed and callable from $PATH.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	Fields map[string]string
	// contains filtered or unexported fields
}

Meta is a meta-file parser.

func ReadMetaFile

func ReadMetaFile(file string) (*Meta, error)

ReadMetaFile reads a meta-file and returns a parser ready to parse.

func (*Meta) Error

func (m *Meta) Error() error

Error returns the error encountered in parsing.

func (*Meta) Float64

func (m *Meta) Float64(key string) float64

Float64 parses an float64.

func (*Meta) Int

func (m *Meta) Int(key string) int

Int parses an int.

func (*Meta) String

func (m *Meta) String(key string) string

String parses a string.

type Sandbox

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

Sandbox implements worker.Sandbox.

func New

func New() *Sandbox

New returns a new sandbox. Panics if isolate is not installed.

func (*Sandbox) Run

func (s *Sandbox) Run(input *worker.SandboxInput) (*worker.SandboxOutput, error)

Run implements Sandbox.Run.

Jump to

Keyboard shortcuts

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