Documentation ¶
Overview ¶
Package runtime provides the runtime implementation.
Index ¶
- Constants
- type ConfigProvider
- type InspectServer
- type ResetOptions
- type Server
- func (s *Server) ApplyConfiguration(ctx context.Context, in *machine.ApplyConfigurationRequest) (*machine.ApplyConfigurationResponse, error)
- func (s *Server) Bootstrap(ctx context.Context, in *machine.BootstrapRequest) (reply *machine.BootstrapResponse, err error)
- func (s *Server) CPUFreqStats(ctx context.Context, in *emptypb.Empty) (*machine.CPUFreqStatsResponse, error)
- func (s *Server) CPUInfo(ctx context.Context, in *emptypb.Empty) (*machine.CPUInfoResponse, error)
- func (s *Server) Containers(ctx context.Context, in *machine.ContainersRequest) (reply *machine.ContainersResponse, err error)
- func (s *Server) Copy(req *machine.CopyRequest, obj machine.MachineService_CopyServer) error
- func (s *Server) DiskStats(ctx context.Context, in *emptypb.Empty) (*machine.DiskStatsResponse, error)
- func (s *Server) DiskUsage(req *machine.DiskUsageRequest, obj machine.MachineService_DiskUsageServer) error
- func (s *Server) Dmesg(req *machine.DmesgRequest, srv machine.MachineService_DmesgServer) error
- func (s *Server) EtcdAlarmDisarm(ctx context.Context, in *emptypb.Empty) (*machine.EtcdAlarmDisarmResponse, error)
- func (s *Server) EtcdAlarmList(ctx context.Context, in *emptypb.Empty) (*machine.EtcdAlarmListResponse, error)
- func (s *Server) EtcdDefragment(ctx context.Context, in *emptypb.Empty) (*machine.EtcdDefragmentResponse, error)
- func (s *Server) EtcdForfeitLeadership(ctx context.Context, in *machine.EtcdForfeitLeadershipRequest) (*machine.EtcdForfeitLeadershipResponse, error)
- func (s *Server) EtcdLeaveCluster(ctx context.Context, in *machine.EtcdLeaveClusterRequest) (*machine.EtcdLeaveClusterResponse, error)
- func (s *Server) EtcdMemberList(ctx context.Context, in *machine.EtcdMemberListRequest) (*machine.EtcdMemberListResponse, error)
- func (s *Server) EtcdRecover(srv machine.MachineService_EtcdRecoverServer) error
- func (s *Server) EtcdRemoveMemberByID(ctx context.Context, in *machine.EtcdRemoveMemberByIDRequest) (*machine.EtcdRemoveMemberByIDResponse, error)
- func (s *Server) EtcdSnapshot(in *machine.EtcdSnapshotRequest, srv machine.MachineService_EtcdSnapshotServer) error
- func (s *Server) EtcdStatus(ctx context.Context, in *emptypb.Empty) (*machine.EtcdStatusResponse, error)
- func (s *Server) Events(req *machine.EventsRequest, l machine.MachineService_EventsServer) error
- func (s *Server) GenerateClientConfiguration(ctx context.Context, in *machine.GenerateClientConfigurationRequest) (*machine.GenerateClientConfigurationResponse, error)
- func (s *Server) GenerateConfiguration(ctx context.Context, in *machine.GenerateConfigurationRequest) (reply *machine.GenerateConfigurationResponse, err error)
- func (s *Server) HealthCheck(in *clusterapi.HealthCheckRequest, ...) error
- func (s *Server) Hostname(ctx context.Context, in *emptypb.Empty) (*machine.HostnameResponse, error)
- func (s *Server) ImageList(req *machine.ImageListRequest, srv machine.MachineService_ImageListServer) error
- func (s *Server) ImagePull(ctx context.Context, req *machine.ImagePullRequest) (*machine.ImagePullResponse, error)
- func (s *Server) Kubeconfig(empty *emptypb.Empty, obj machine.MachineService_KubeconfigServer) error
- func (s *Server) List(req *machine.ListRequest, obj machine.MachineService_ListServer) error
- func (s *Server) LoadAvg(ctx context.Context, in *emptypb.Empty) (*machine.LoadAvgResponse, error)
- func (s *Server) Logs(req *machine.LogsRequest, l machine.MachineService_LogsServer) (err error)
- func (s *Server) LogsContainers(context.Context, *emptypb.Empty) (*machine.LogsContainersResponse, error)
- func (s *Server) Memory(ctx context.Context, in *emptypb.Empty) (reply *machine.MemoryResponse, err error)
- func (s *Server) MetaDelete(ctx context.Context, req *machine.MetaDeleteRequest) (*machine.MetaDeleteResponse, error)
- func (s *Server) MetaWrite(ctx context.Context, req *machine.MetaWriteRequest) (*machine.MetaWriteResponse, error)
- func (s *Server) Mounts(ctx context.Context, in *emptypb.Empty) (reply *machine.MountsResponse, err error)
- func (s *Server) Netstat(ctx context.Context, req *machine.NetstatRequest) (*machine.NetstatResponse, error)
- func (s *Server) NetworkDeviceStats(ctx context.Context, in *emptypb.Empty) (*machine.NetworkDeviceStatsResponse, error)
- func (s *Server) PacketCapture(in *machine.PacketCaptureRequest, ...) error
- func (s *Server) Processes(ctx context.Context, in *emptypb.Empty) (reply *machine.ProcessesResponse, err error)
- func (s *Server) Read(in *machine.ReadRequest, srv machine.MachineService_ReadServer) (err error)
- func (s *Server) Reboot(ctx context.Context, in *machine.RebootRequest) (reply *machine.RebootResponse, err error)
- func (s *Server) Register(obj *grpc.Server)
- func (s *Server) Reset(ctx context.Context, in *machine.ResetRequest) (reply *machine.ResetResponse, err error)
- func (s *Server) Restart(ctx context.Context, in *machine.RestartRequest) (*machine.RestartResponse, error)
- func (s *Server) Rollback(ctx context.Context, in *machine.RollbackRequest) (*machine.RollbackResponse, error)
- func (s *Server) ServiceList(ctx context.Context, in *emptypb.Empty) (result *machine.ServiceListResponse, err error)
- func (s *Server) ServiceRestart(ctx context.Context, in *machine.ServiceRestartRequest) (reply *machine.ServiceRestartResponse, err error)
- func (s *Server) ServiceStart(ctx context.Context, in *machine.ServiceStartRequest) (reply *machine.ServiceStartResponse, err error)
- func (s *Server) ServiceStop(ctx context.Context, in *machine.ServiceStopRequest) (reply *machine.ServiceStopResponse, err error)
- func (s *Server) Shutdown(ctx context.Context, in *machine.ShutdownRequest) (reply *machine.ShutdownResponse, err error)
- func (s *Server) Stats(ctx context.Context, in *machine.StatsRequest) (reply *machine.StatsResponse, err error)
- func (s *Server) SystemStat(ctx context.Context, in *emptypb.Empty) (*machine.SystemStatResponse, error)
- func (s *Server) Upgrade(ctx context.Context, in *machine.UpgradeRequest) (*machine.UpgradeResponse, error)
- func (s *Server) Version(ctx context.Context, in *emptypb.Empty) (reply *machine.VersionResponse, err error)
- type TimeServer
Constants ¶
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.
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 ¶
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.
func (*ResetOptions) String ¶ added in v1.8.1
func (opt *ResetOptions) String() string
String 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 ¶
func (s *Server) ApplyConfiguration(ctx context.Context, in *machine.ApplyConfigurationRequest) (*machine.ApplyConfigurationResponse, error)
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) CPUFreqStats ¶
func (s *Server) CPUFreqStats(ctx context.Context, in *emptypb.Empty) (*machine.CPUFreqStatsResponse, error)
CPUFreqStats 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 ¶
func (s *Server) Copy(req *machine.CopyRequest, obj machine.MachineService_CopyServer) error
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 ¶
func (s *Server) DiskUsage(req *machine.DiskUsageRequest, obj machine.MachineService_DiskUsageServer) error
DiskUsage implements the machine.MachineServer interface.
func (*Server) Dmesg ¶
func (s *Server) Dmesg(req *machine.DmesgRequest, srv machine.MachineService_DmesgServer) error
Dmesg implements the machine.MachineServer interface.
func (*Server) EtcdAlarmDisarm ¶ added in v1.4.0
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 ¶ added in v1.4.0
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 ¶ added in v1.4.0
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 ¶
func (s *Server) EtcdForfeitLeadership(ctx context.Context, in *machine.EtcdForfeitLeadershipRequest) (*machine.EtcdForfeitLeadershipResponse, error)
EtcdForfeitLeadership implements the machine.MachineServer interface.
func (*Server) EtcdLeaveCluster ¶
func (s *Server) EtcdLeaveCluster(ctx context.Context, in *machine.EtcdLeaveClusterRequest) (*machine.EtcdLeaveClusterResponse, error)
EtcdLeaveCluster implements the machine.MachineServer interface.
func (*Server) EtcdMemberList ¶
func (s *Server) EtcdMemberList(ctx context.Context, in *machine.EtcdMemberListRequest) (*machine.EtcdMemberListResponse, error)
EtcdMemberList implements the machine.MachineServer interface.
func (*Server) EtcdRecover ¶
func (s *Server) EtcdRecover(srv machine.MachineService_EtcdRecoverServer) error
EtcdRecover implements the machine.MachineServer interface.
func (*Server) EtcdRemoveMemberByID ¶
func (s *Server) EtcdRemoveMemberByID(ctx context.Context, in *machine.EtcdRemoveMemberByIDRequest) (*machine.EtcdRemoveMemberByIDResponse, error)
EtcdRemoveMemberByID implements the machine.MachineServer interface.
func (*Server) EtcdSnapshot ¶
func (s *Server) EtcdSnapshot(in *machine.EtcdSnapshotRequest, srv machine.MachineService_EtcdSnapshotServer) error
EtcdSnapshot implements the machine.MachineServer interface.
func (*Server) EtcdStatus ¶ added in v1.4.0
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 ¶
func (s *Server) Events(req *machine.EventsRequest, l machine.MachineService_EventsServer) error
Events streams runtime events.
func (*Server) GenerateClientConfiguration ¶
func (s *Server) GenerateClientConfiguration(ctx context.Context, in *machine.GenerateClientConfigurationRequest) (*machine.GenerateClientConfigurationResponse, error)
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 ¶
func (s *Server) HealthCheck(in *clusterapi.HealthCheckRequest, srv clusterapi.ClusterService_HealthCheckServer) error
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 ¶ added in v1.5.0
func (s *Server) ImageList(req *machine.ImageListRequest, srv machine.MachineService_ImageListServer) error
ImageList lists the images in the CRI.
func (*Server) ImagePull ¶ added in v1.5.0
func (s *Server) ImagePull(ctx context.Context, req *machine.ImagePullRequest) (*machine.ImagePullResponse, error)
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 ¶
func (s *Server) List(req *machine.ListRequest, obj machine.MachineService_ListServer) error
List implements the machine.MachineServer interface.
func (*Server) Logs ¶
func (s *Server) Logs(req *machine.LogsRequest, l machine.MachineService_LogsServer) (err error)
Logs provides a service or container logs can be requested and the contents of the log file are streamed in chunks.
func (*Server) LogsContainers ¶ added in v1.7.0
func (s *Server) LogsContainers(context.Context, *emptypb.Empty) (*machine.LogsContainersResponse, error)
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 ¶ added in v1.4.0
func (s *Server) MetaDelete(ctx context.Context, req *machine.MetaDeleteRequest) (*machine.MetaDeleteResponse, error)
MetaDelete implements the machine.MachineServer interface.
func (*Server) MetaWrite ¶ added in v1.4.0
func (s *Server) MetaWrite(ctx context.Context, req *machine.MetaWriteRequest) (*machine.MetaWriteResponse, error)
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 ¶ added in v1.4.0
func (s *Server) Netstat(ctx context.Context, req *machine.NetstatRequest) (*machine.NetstatResponse, error)
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 ¶
func (s *Server) PacketCapture(in *machine.PacketCaptureRequest, srv machine.MachineService_PacketCaptureServer) error
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 ¶
func (s *Server) Read(in *machine.ReadRequest, srv machine.MachineService_ReadServer) (err error)
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) Reset ¶
func (s *Server) Reset(ctx context.Context, in *machine.ResetRequest) (reply *machine.ResetResponse, err error)
Reset resets the node.
func (*Server) Restart ¶
func (s *Server) Restart(ctx context.Context, in *machine.RestartRequest) (*machine.RestartResponse, error)
Restart implements the machine.MachineServer interface.
func (*Server) Rollback ¶
func (s *Server) Rollback(ctx context.Context, in *machine.RollbackRequest) (*machine.RollbackResponse, error)
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 ¶
func (s *Server) Upgrade(ctx context.Context, in *machine.UpgradeRequest) (*machine.UpgradeResponse, error)
Upgrade initiates an upgrade.
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.