fake

package
v0.0.0-...-66691d1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the version of the fake runtime.
	Version = "0.1.0"

	// RuntimeName is the name of the fake runtime.
	RuntimeName = "fakeRuntime"
)

Functions

This section is empty.

Types

type FakeInstance

type FakeInstance struct {
	iri.Instance
}

type FakeRuntimeService

type FakeRuntimeService struct {
	sync.RWMutex

	Instances   map[string]*FakeInstance
	Capacity    *iri.RuntimeResources
	Allocatable *iri.RuntimeResources
	GetExecURL  func(req *iri.ExecRequest) string
}

func NewFakeRuntimeService

func NewFakeRuntimeService() *FakeRuntimeService

func (*FakeRuntimeService) AttachDisk

func (*FakeRuntimeService) AttachNetworkInterface

func (*FakeRuntimeService) CreateInstance

func (*FakeRuntimeService) DeleteInstance

func (*FakeRuntimeService) DetachDisk

func (*FakeRuntimeService) DetachNetworkInterface

func (*FakeRuntimeService) Exec

func (*FakeRuntimeService) GetFirstInstanceByLabel

func (r *FakeRuntimeService) GetFirstInstanceByLabel(label, value string) (*FakeInstance, error)

func (*FakeRuntimeService) GetInstance

func (r *FakeRuntimeService) GetInstance(id string) (*FakeInstance, error)

func (*FakeRuntimeService) ListInstances

func (*FakeRuntimeService) SetGetExecURL

func (r *FakeRuntimeService) SetGetExecURL(f func(req *iri.ExecRequest) string)

func (*FakeRuntimeService) SetInstances

func (r *FakeRuntimeService) SetInstances(instances []*FakeInstance)

func (*FakeRuntimeService) SetStatus

func (r *FakeRuntimeService) SetStatus(capacity, allocatable *iri.RuntimeResources)

func (*FakeRuntimeService) Status

func (*FakeRuntimeService) UpdateInstance

func (r *FakeRuntimeService) UpdateInstance(inst *FakeInstance) error

func (*FakeRuntimeService) UpdateInstancePower

func (*FakeRuntimeService) Version

type FakeStatus

type FakeStatus struct {
	Capacity    iri.RuntimeResources
	Allocatable iri.RuntimeResources
}

Jump to

Keyboard shortcuts

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