wire

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 4 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 {
	// NoStandardMounts tells to not mount standard mounts like /proc, /dev, /tmp ... inside new root.
	NoStandardMounts bool

	// 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 InitFromDocker

type InitFromDocker struct {
	// Image is the name of the image
	Image string

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

InitFromDocker initializes filesystem by downloading and integrating docker image

type Log

type Log struct {
	// Stream is the type of stream where log was produced
	Stream Stream

	// Text is text printed by command
	Text string
}

Log is the log message printed by executed command

type Mount

type Mount struct {
	// Location on Host
	Host string

	// Mountpoint inside container
	Container 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 Stream

type Stream int

Stream is the type of stream where log was produced

const (
	// StreamOut represents stdout
	StreamOut Stream = iota

	// StreamErr represents stderr
	StreamErr
)

Jump to

Keyboard shortcuts

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