vs

package
v0.0.0-...-e377a08 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package vs is used for the comunication via vsockets.

Index

Constants

View Source
const (
	TypeControlConn byte = iota // connection to submit a new job
	TypeExecuteConn             // connection to start a job and handle IO
	Done                        // indicates that the job has finished
)

control bytes

View Source
const Port = 1

Port is the listening port number of vsockd process.

Variables

This section is empty.

Functions

func ContextID

func ContextID(id string) (uint32, error)

ContextID returns a (uint32) number based on the given input string. The input string must consists of at least 8 hexadecimal characters.

Types

type JobID

type JobID [4]byte

JobID is used to connect a control connection to an execute connection.

type JobRequest

type JobRequest struct {
	Args      []string
	Env       []string
	WithStdin bool
	WithTTY   bool
}

JobRequest defines a command to run inside a runq vm.

func DecodeJobRequest

func DecodeJobRequest(buf []byte) (*JobRequest, error)

DecodeJobRequest decodes a byte buffer into a job request object.

func (JobRequest) Encode

func (jr JobRequest) Encode() ([]byte, error)

Encode encodes a job request into gob binary format.

Jump to

Keyboard shortcuts

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