runtime

package
v0.6.6 Latest Latest
Warning

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

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

Documentation

Overview

Package runtime provides the runtime implementation.

Index

Constants

View Source
const MinimumEtcdUpgradeLeaseLockSeconds = 60

MinimumEtcdUpgradeLeaseLockSeconds indicates the minimum number of seconds for which we open a lease lock for upgrading Etcd nodes. This is not intended to lock for the duration of an upgrade. Rather, it is intended to make sure only one node processes the various pre-upgrade checks at a time. Thus, this timeout should be reflective of the expected time for the pre-upgrade checks, NOT the time to perform the upgrade itself.

View Source
const OSPathSeparator = string(os.PathSeparator)

OSPathSeparator is the string version of the os.PathSeparator.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigProvider

type ConfigProvider interface {
	Config() config.Config
}

ConfigProvider defines an interface sufficient for the TimeServer.

type InspectServer

type InspectServer struct {
	inspectapi.UnimplementedInspectServiceServer
	// contains filtered or unexported fields
}

InspectServer implements InspectService API.

func (*InspectServer) ControllerRuntimeDependencies

func (s *InspectServer) ControllerRuntimeDependencies(ctx context.Context, in *emptypb.Empty) (*inspectapi.ControllerRuntimeDependenciesResponse, error)

ControllerRuntimeDependencies implements inspect.InspectService interface.

type ResetOptions

type ResetOptions struct {
	*machine.ResetRequest
	// contains filtered or unexported fields
}

ResetOptions implements runtime.ResetOptions interface.

func (*ResetOptions) GetSystemDiskTargets

func (opt *ResetOptions) GetSystemDiskTargets() []runtime.PartitionTarget

GetSystemDiskTargets implements runtime.ResetOptions interface.

type Server

type Server struct {
	cluster.UnimplementedClusterServiceServer
	machine.UnimplementedMachineServiceServer

	Controller runtime.Controller
	// breaking the import loop cycle between services/ package and v1alpha1_server.go
	EtcdBootstrapper func(context.Context, runtime.Runtime, *machine.BootstrapRequest) error

	// ShutdownCtx signals that the server is shutting down.
	ShutdownCtx context.Context //nolint:containedctx
	// contains filtered or unexported fields
}

Server implements ClusterService and MachineService APIs and is also responsible for registering ResourceServer and InspectServer.

func (*Server) ApplyConfiguration

ApplyConfiguration implements machine.MachineService.

func (*Server) Bootstrap

func (s *Server) Bootstrap(ctx context.Context, in *machine.BootstrapRequest) (reply *machine.BootstrapResponse, err error)

Bootstrap implements the machine.MachineServer interface.

func (*Server) CPUInfo

func (s *Server) CPUInfo(ctx context.Context, in *emptypb.Empty) (*machine.CPUInfoResponse, error)

CPUInfo implements the machine.MachineServer interface.

func (*Server) Containers

func (s *Server) Containers(ctx context.Context, in *machine.ContainersRequest) (reply *machine.ContainersResponse, err error)

Containers implements the machine.MachineServer interface.

func (*Server) Copy

Copy implements the machine.MachineServer interface and copies data out of Talos node.

func (*Server) DiskStats

func (s *Server) DiskStats(ctx context.Context, in *emptypb.Empty) (*machine.DiskStatsResponse, error)

DiskStats implements the machine.MachineServer interface.

func (*Server) DiskUsage

DiskUsage implements the machine.MachineServer interface.

func (*Server) Dmesg

Dmesg implements the machine.MachineServer interface.

func (*Server) EtcdAlarmDisarm

func (s *Server) EtcdAlarmDisarm(ctx context.Context, in *emptypb.Empty) (*machine.EtcdAlarmDisarmResponse, error)

EtcdAlarmDisarm disarms etcd alarms for the current node.

This method is available only on control plane nodes (which run etcd).

func (*Server) EtcdAlarmList

func (s *Server) EtcdAlarmList(ctx context.Context, in *emptypb.Empty) (*machine.EtcdAlarmListResponse, error)

EtcdAlarmList lists etcd alarms for the current node.

This method is available only on control plane nodes (which run etcd).

func (*Server) EtcdDefragment

func (s *Server) EtcdDefragment(ctx context.Context, in *emptypb.Empty) (*machine.EtcdDefragmentResponse, error)

EtcdDefragment defragments etcd data directory for the current node.

Defragmentation is a resource-heavy operation, so it should only run on a specific node.

This method is available only on control plane nodes (which run etcd).

func (*Server) EtcdForfeitLeadership

EtcdForfeitLeadership implements the machine.MachineServer interface.

func (*Server) EtcdLeaveCluster

EtcdLeaveCluster implements the machine.MachineServer interface.

func (*Server) EtcdMemberList

EtcdMemberList implements the machine.MachineServer interface.

func (*Server) EtcdRecover

EtcdRecover implements the machine.MachineServer interface.

func (*Server) EtcdRemoveMemberByID

EtcdRemoveMemberByID implements the machine.MachineServer interface.

func (*Server) EtcdSnapshot

EtcdSnapshot implements the machine.MachineServer interface.

func (*Server) EtcdStatus

func (s *Server) EtcdStatus(ctx context.Context, in *emptypb.Empty) (*machine.EtcdStatusResponse, error)

EtcdStatus returns etcd status for the member of the cluster.

This method is available only on control plane nodes (which run etcd).

func (*Server) Events

Events streams runtime events.

func (*Server) GenerateClientConfiguration

GenerateClientConfiguration implements the machine.MachineServer interface.

func (*Server) GenerateConfiguration

func (s *Server) GenerateConfiguration(ctx context.Context, in *machine.GenerateConfigurationRequest) (reply *machine.GenerateConfigurationResponse, err error)

GenerateConfiguration implements the machine.MachineServer interface.

func (*Server) HealthCheck

HealthCheck implements the cluster.ClusterServer interface.

func (*Server) Hostname

func (s *Server) Hostname(ctx context.Context, in *emptypb.Empty) (*machine.HostnameResponse, error)

Hostname implements the machine.MachineServer interface.

func (*Server) ImageList

ImageList lists the images in the CRI.

func (*Server) ImagePull

ImagePull pulls an image to the CRI.

func (*Server) Kubeconfig

func (s *Server) Kubeconfig(empty *emptypb.Empty, obj machine.MachineService_KubeconfigServer) error

Kubeconfig implements the machine.MachineServer interface.

func (*Server) List

List implements the machine.MachineServer interface.

func (*Server) LoadAvg

func (s *Server) LoadAvg(ctx context.Context, in *emptypb.Empty) (*machine.LoadAvgResponse, error)

LoadAvg implements the machine.MachineServer interface.

func (*Server) Logs

Logs provides a service or container logs can be requested and the contents of the log file are streamed in chunks.

func (*Server) LogsContainers

LogsContainers provide a list of registered log containers.

func (*Server) Memory

func (s *Server) Memory(ctx context.Context, in *emptypb.Empty) (reply *machine.MemoryResponse, err error)

Memory implements the machine.MachineServer interface.

func (*Server) MetaDelete

MetaDelete implements the machine.MachineServer interface.

func (*Server) MetaWrite

MetaWrite implements the machine.MachineServer interface.

func (*Server) Mounts

func (s *Server) Mounts(ctx context.Context, in *emptypb.Empty) (reply *machine.MountsResponse, err error)

Mounts implements the machine.MachineServer interface.

func (*Server) Netstat

Netstat implements the machine.MachineServer interface.

func (*Server) NetworkDeviceStats

func (s *Server) NetworkDeviceStats(ctx context.Context, in *emptypb.Empty) (*machine.NetworkDeviceStatsResponse, error)

NetworkDeviceStats implements the machine.MachineServer interface.

func (*Server) PacketCapture

PacketCapture performs packet capture and streams the pcap file.

func (*Server) Processes

func (s *Server) Processes(ctx context.Context, in *emptypb.Empty) (reply *machine.ProcessesResponse, err error)

Processes implements the machine.MachineServer interface.

func (*Server) Read

Read implements the read API.

func (*Server) Reboot

func (s *Server) Reboot(ctx context.Context, in *machine.RebootRequest) (reply *machine.RebootResponse, err error)

Reboot implements the machine.MachineServer interface.

func (*Server) Register

func (s *Server) Register(obj *grpc.Server)

Register implements the factory.Registrator interface.

func (*Server) Reset

func (s *Server) Reset(ctx context.Context, in *machine.ResetRequest) (reply *machine.ResetResponse, err error)

Reset resets the node.

func (*Server) Restart

Restart implements the machine.MachineServer interface.

func (*Server) Rollback

Rollback implements the machine.MachineServer interface.

func (*Server) ServiceList

func (s *Server) ServiceList(ctx context.Context, in *emptypb.Empty) (result *machine.ServiceListResponse, err error)

ServiceList returns list of the registered services and their status.

func (*Server) ServiceRestart

func (s *Server) ServiceRestart(ctx context.Context, in *machine.ServiceRestartRequest) (reply *machine.ServiceRestartResponse, err error)

ServiceRestart implements the machine.MachineServer interface and stops a service running on Talos.

func (*Server) ServiceStart

func (s *Server) ServiceStart(ctx context.Context, in *machine.ServiceStartRequest) (reply *machine.ServiceStartResponse, err error)

ServiceStart implements the machine.MachineServer interface and starts a service running on Talos.

func (*Server) ServiceStop

func (s *Server) ServiceStop(ctx context.Context, in *machine.ServiceStopRequest) (reply *machine.ServiceStopResponse, err error)

ServiceStop implements the machine.MachineServer interface and stops a service running on Talos.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context, in *machine.ShutdownRequest) (reply *machine.ShutdownResponse, err error)

Shutdown implements the machine.MachineServer interface.

func (*Server) Stats

func (s *Server) Stats(ctx context.Context, in *machine.StatsRequest) (reply *machine.StatsResponse, err error)

Stats implements the machine.MachineServer interface.

func (*Server) SystemStat

func (s *Server) SystemStat(ctx context.Context, in *emptypb.Empty) (*machine.SystemStatResponse, error)

SystemStat implements the machine.MachineServer interface.

func (*Server) Upgrade

Upgrade initiates an upgrade.

func (*Server) Version

func (s *Server) Version(ctx context.Context, in *emptypb.Empty) (reply *machine.VersionResponse, err error)

Version implements the machine.MachineServer interface.

type TimeServer

type TimeServer struct {
	timeapi.UnimplementedTimeServiceServer

	ConfigProvider ConfigProvider
}

TimeServer implements TimeService API.

func (*TimeServer) Register

func (r *TimeServer) Register(s *grpc.Server)

Register implements the factory.Registrator interface.

func (*TimeServer) Time

func (r *TimeServer) Time(ctx context.Context, in *emptypb.Empty) (reply *timeapi.TimeResponse, err error)

Time issues a query to the configured ntp server and displays the results.

func (*TimeServer) TimeCheck

func (r *TimeServer) TimeCheck(ctx context.Context, in *timeapi.TimeRequest) (reply *timeapi.TimeResponse, err error)

TimeCheck issues a query to the specified ntp server and displays the results.

Jump to

Keyboard shortcuts

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