Documentation
¶
Overview ¶
SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- Variables
- type MachineClassRegistry
- type Options
- type Server
- func (s *Server) AttachNetworkInterface(ctx context.Context, req *iri.AttachNetworkInterfaceRequest) (res *iri.AttachNetworkInterfaceResponse, retErr error)
- func (s *Server) AttachVolume(ctx context.Context, req *iri.AttachVolumeRequest) (*iri.AttachVolumeResponse, error)
- func (s *Server) CreateMachine(ctx context.Context, req *iri.CreateMachineRequest) (res *iri.CreateMachineResponse, retErr error)
- func (s *Server) DeleteMachine(ctx context.Context, req *iri.DeleteMachineRequest) (*iri.DeleteMachineResponse, error)
- func (s *Server) DetachNetworkInterface(ctx context.Context, req *iri.DetachNetworkInterfaceRequest) (*iri.DetachNetworkInterfaceResponse, error)
- func (s *Server) DetachVolume(ctx context.Context, req *iri.DetachVolumeRequest) (*iri.DetachVolumeResponse, error)
- func (s *Server) Exec(ctx context.Context, req *iri.ExecRequest) (*iri.ExecResponse, error)
- func (s *Server) ListEvents(ctx context.Context, req *iri.ListEventsRequest) (*iri.ListEventsResponse, error)
- func (s *Server) ListMachines(ctx context.Context, req *iri.ListMachinesRequest) (*iri.ListMachinesResponse, error)
- func (s *Server) ServeExec(w http.ResponseWriter, req *http.Request, token string)
- func (s *Server) Status(ctx context.Context, req *iri.StatusRequest) (*iri.StatusResponse, error)
- func (s *Server) UpdateMachineAnnotations(ctx context.Context, req *iri.UpdateMachineAnnotationsRequest) (*iri.UpdateMachineAnnotationsResponse, error)
- func (s *Server) UpdateMachinePower(ctx context.Context, req *iri.UpdateMachinePowerRequest) (*iri.UpdateMachinePowerResponse, error)
- func (s *Server) UpdateVolume(ctx context.Context, req *iri.UpdateVolumeRequest) (*iri.UpdateVolumeResponse, error)
- func (s *Server) Version(ctx context.Context, req *iri.VersionRequest) (*iri.VersionResponse, error)
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") 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 (*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) Status ¶
func (s *Server) Status(ctx context.Context, req *iri.StatusRequest) (*iri.StatusResponse, error)
func (*Server) UpdateMachineAnnotations ¶
func (s *Server) UpdateMachineAnnotations(ctx context.Context, req *iri.UpdateMachineAnnotationsRequest) (*iri.UpdateMachineAnnotationsResponse, error)
func (*Server) UpdateMachinePower ¶
func (s *Server) UpdateMachinePower(ctx context.Context, req *iri.UpdateMachinePowerRequest) (*iri.UpdateMachinePowerResponse, error)
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)
Source Files
¶
- common.go
- event_list.go
- exec.go
- machine.go
- machine_annotations_update.go
- machine_create.go
- machine_delete.go
- machine_list.go
- machine_networkinterface_attach.go
- machine_networkinterface_detach.go
- machine_powerstate_update.go
- machine_volume_attach.go
- machine_volume_detach.go
- machine_volume_update.go
- server.go
- status.go
- version.go
Click to show internal directories.
Click to hide internal directories.