server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Overview

SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	StreamCreationTimeout = 30 * time.Second
	StreamIdleTimeout     = 2 * time.Minute
)

Variables

View Source
var (
	ErrMachineNotFound            = errors.New("machine not found")
	ErrNicNotFound                = errors.New("nic not found")
	ErrVolumeNotFound             = errors.New("volume not found")
	ErrMachineIsntManaged         = errors.New("machine isn't managed")
	ErrMachineUnavailable         = errors.New("machine isn't available")
	ErrPCIControllerMaxedOut      = errors.New("pci controllers count already maxed out")
	ErrActiveConsoleSessionExists = errors.New("active console session exists for this domain")
	ErrInvalidRequest             = errors.New("invalid request")
)

Functions

This section is empty.

Types

type MachineClassRegistry

type MachineClassRegistry interface {
	Get(volumeClassName string) (*mcr.MachineClass, bool)
	List() []*mcr.MachineClass
}

type Options

type Options struct {
	// BaseURL is the base URL in form http(s)://host:port/path?query to produce request URLs relative to.
	BaseURL string

	Libvirt *libvirt.Libvirt

	IDGen idgen.IDGen

	MachineStore store.Store[*api.Machine]
	EventStore   recorder.EventStore

	MachineClasses MachineClassRegistry

	VolumePlugins   *volume.PluginManager
	NetworkPlugins  providernetworkinterface.Plugin
	ResourceClaimer claim.Claimer
	EnableHugepages bool
	GuestAgent      api.GuestAgent
}

type Server

type Server struct {
	iri.UnimplementedMachineRuntimeServer
	// contains filtered or unexported fields
}

func New

func New(opts Options) (*Server, error)

func (*Server) AttachNetworkInterface

func (s *Server) AttachNetworkInterface(ctx context.Context, req *iri.AttachNetworkInterfaceRequest) (res *iri.AttachNetworkInterfaceResponse, retErr error)

func (*Server) AttachVolume

func (s *Server) AttachVolume(ctx context.Context, req *iri.AttachVolumeRequest) (*iri.AttachVolumeResponse, error)

func (*Server) CreateMachine

func (s *Server) CreateMachine(ctx context.Context, req *iri.CreateMachineRequest) (res *iri.CreateMachineResponse, retErr error)

func (*Server) DeleteMachine

func (s *Server) DeleteMachine(ctx context.Context, req *iri.DeleteMachineRequest) (*iri.DeleteMachineResponse, error)

func (*Server) DetachNetworkInterface

func (s *Server) DetachNetworkInterface(
	ctx context.Context,
	req *iri.DetachNetworkInterfaceRequest,
) (*iri.DetachNetworkInterfaceResponse, error)

func (*Server) DetachVolume

func (s *Server) DetachVolume(ctx context.Context, req *iri.DetachVolumeRequest) (*iri.DetachVolumeResponse, error)

func (*Server) Exec

func (s *Server) Exec(ctx context.Context, req *iri.ExecRequest) (*iri.ExecResponse, error)

func (*Server) ListEvents

func (s *Server) ListEvents(ctx context.Context, req *iri.ListEventsRequest) (*iri.ListEventsResponse, error)

func (*Server) ListMachines

func (s *Server) ListMachines(ctx context.Context, req *iri.ListMachinesRequest) (*iri.ListMachinesResponse, error)

func (*Server) ServeExec

func (s *Server) ServeExec(w http.ResponseWriter, req *http.Request, token string)

func (*Server) Status

func (s *Server) Status(ctx context.Context, req *iri.StatusRequest) (*iri.StatusResponse, error)

func (*Server) UpdateMachinePower

func (*Server) UpdateVolume added in v0.3.0

func (s *Server) UpdateVolume(ctx context.Context, req *iri.UpdateVolumeRequest) (*iri.UpdateVolumeResponse, error)

func (*Server) Version

func (s *Server) Version(ctx context.Context, req *iri.VersionRequest) (*iri.VersionResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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