vm

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0

Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0

Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event added in v0.4.0

type Event struct {
	EventType     string
	Timestamp     *timestamppb.Timestamp
	ComputationId string
	Details       []byte
	Originator    string
	Status        string
}

type EventSender added in v0.4.0

type EventSender func(event interface{}) error

type Log added in v0.4.0

type Log struct {
	Message       string
	ComputationId string
	Level         string
	Timestamp     *timestamppb.Timestamp
}

type Provider

type Provider func(config interface{}, eventSender EventSender, computationId string) VM

type StateMachine added in v0.4.0

type StateMachine interface {
	Transition(newState manager.ManagerState) error
	State() string
}

func NewStateMachine added in v0.4.0

func NewStateMachine() StateMachine

type Stderr

type Stderr struct {
	EventSender   EventSender
	ComputationId string
	StateMachine  StateMachine
}

func (*Stderr) Write

func (s *Stderr) Write(p []byte) (n int, err error)

Write implements io.Writer.

type Stdout

type Stdout struct {
	EventSender   EventSender
	ComputationId string
}

func (*Stdout) Write

func (s *Stdout) Write(p []byte) (n int, err error)

Write implements io.Writer.

type VM

type VM interface {
	Start() error
	Stop() error
	SendAgentConfig(ac agent.Computation) error
	SetProcess(pid int) error
	GetProcess() int
	GetCID() int
	Transition(newState pkgmanager.ManagerState) error
	State() string
	GetConfig() interface{}
}

VM represents a virtual machine.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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