execmeta

package
v0.0.0-...-41e44c1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package execmeta models the executor meta data that is communicated from the state tool to executors via file. The meta file is stored alongside the executors and should be named "meta.as". It should be applied to the file file system when the runtime is manifested on disk.

IMPORTANT: This package should have minimal dependencies as it will be imported by cmd/state-exec. The resulting compiled executable must remain as small as possible.

Index

Constants

View Source
const (
	MetaFileName = "meta.as"
)

Variables

This section is empty.

Functions

func IsMetaFile

func IsMetaFile(fileContents []byte) bool

Types

type ExecMeta

type ExecMeta struct {
	SockPath   string
	Env        []string
	Bins       map[string]string // map[alias]dest
	CommitUUID string
	Namespace  string
	Headless   bool
}

func New

func New(sockPath string, env []string, t Target, bins map[string]string) *ExecMeta

func NewFromFile

func NewFromFile(path string) (*ExecMeta, error)

NewFromFile is a convenience func, not intended to be tested.

func NewFromReader

func NewFromReader(r io.Reader) (*ExecMeta, error)

func (*ExecMeta) Encode

func (m *ExecMeta) Encode(w io.Writer) error

func (*ExecMeta) WriteToDisk

func (m *ExecMeta) WriteToDisk(dir string) error

WriteToDisk is a convenience func, not intended to be unit tested.

type Target

type Target struct {
	CommitUUID string
	Namespace  string
	Dir        string
	Headless   bool
}

Jump to

Keyboard shortcuts

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