wire

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentToType

func ContentToType(content interface{}) string

ContentToType returns string representation for type of the content.

Types

type Config

type Config struct {
	// ConfigureSystem tells executor to mount standard mounts like /proc, /dev, /tmp ...  and configure DNS inside new root.
	ConfigureSystem bool

	// UseHostNetwork instructs isolator to use host's network and prevents network namespace from being isolated.
	UseHostNetwork bool

	// IP is the IP to assign executor to.
	IP *net.IPNet

	// Hostname is the hostname to set inside namespace.
	Hostname string

	// DNS is the list of DnS servers to configure inside namespace.
	DNS []net.IP

	// Hosts is the list of hosts and their IP addresses to resolve inside namespace.
	Hosts map[string]net.IP

	// Mounts is the list of bindings to apply inside container
	Mounts []Mount
}

Config stores configuration of executor

type DecoderFunc

type DecoderFunc func() (interface{}, error)

DecoderFunc is the decoding function.

func NewDecoder

func NewDecoder(r io.Reader, types []interface{}) DecoderFunc

NewDecoder creates new message decoder.

type EncoderFunc

type EncoderFunc func(content interface{}) error

EncoderFunc is the encoding function.

func NewEncoder

func NewEncoder(w io.Writer) EncoderFunc

NewEncoder creates new message encoder.

type Execute

type Execute struct {
	// Command is a command to execute
	Command string
}

Execute is sent to execute a shell command

type InflateDockerImage added in v0.8.0

type InflateDockerImage struct {
	// Path were cached downloads are stored.
	CacheDir string

	// Image is the name of the image.
	Image string

	// Tag is the tag of the image.
	Tag string
}

InflateDockerImage initializes filesystem by downloading and inflating docker image.

type Log

type Log struct {
	// Time is the time when log was produced.
	Time time.Time

	// Content is text printed by command.
	Content []byte
}

Log is the log message printed by executed command.

type Mount

type Mount struct {
	// Host is the location on host.
	Host string

	// Namespace is the mountpoint inside namespace.
	Namespace string

	// Writable makes mount writable inside container.
	Writable bool
}

Mount defines directories to mount inside container.

type Result

type Result struct {
	// Error is the error returned by command
	Error string
}

Result is sent once command finishes

type RunDockerContainer added in v0.9.0

type RunDockerContainer struct {
	// Path were cached downloads are stored.
	CacheDir string

	// Name is the name of the container.
	Name string

	// Image is the name of the image.
	Image string

	// Tag is the tag of the image.
	Tag string

	// EnvVars sets environment variables inside container.
	EnvVars map[string]string

	// User is the username or UID and group name or GID to use.
	User string

	// WorkingDir is the path to working directory inside the container.
	WorkingDir string

	// Entrypoint for container.
	Entrypoint []string

	// Args is a list of arguments for the container.
	Args []string
}

RunDockerContainer runs docker container.

type RunEmbeddedFunction added in v0.10.0

type RunEmbeddedFunction struct {
	// Name is the name of the embedded function.
	Name string

	// Args is a list of arguments for the embedded function.
	Args []string
}

RunEmbeddedFunction runs embedded function.

Jump to

Keyboard shortcuts

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