logind

package
v1.14.5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MPL-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package logind provides D-Bus logind mock to facilitate graceful kubelet shutdown.

Index

Constants

View Source
const InhibitMaxDelay = 40 * constants.KubeletShutdownGracePeriod

InhibitMaxDelay is the maximum delay for graceful shutdown.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBusBroker

type DBusBroker struct {
	// contains filtered or unexported fields
}

DBusBroker implements simplified D-Bus broker which allows to connect kubelet D-Bus connection with Talos logind mock.

Broker doesn't actually implement auth, and it is supposed that service connects on one socket, while a client connects on another socket.

func NewBroker

func NewBroker(ctx context.Context, serviceSocketPath, clientSocketPath string) (*DBusBroker, error)

NewBroker initializes new broker.

func (*DBusBroker) Close

func (broker *DBusBroker) Close() error

Close the listen sockets.

func (*DBusBroker) Run

func (broker *DBusBroker) Run(ctx context.Context) error

Run the broker.

type ServiceMock

type ServiceMock struct {
	// contains filtered or unexported fields
}

ServiceMock connects to the broker and mocks the D-Bus and logind.

func NewServiceMock

func NewServiceMock(socketPath string) (*ServiceMock, error)

NewServiceMock initializes the D-Bus and logind mock.

func (*ServiceMock) Close

func (mock *ServiceMock) Close() error

Close the connection.

func (*ServiceMock) EmitShutdown

func (mock *ServiceMock) EmitShutdown() error

EmitShutdown notifies about the shutdown.

func (*ServiceMock) WaitLockRelease

func (mock *ServiceMock) WaitLockRelease(ctx context.Context) error

WaitLockRelease waits for the inhibit lock to be released.

Jump to

Keyboard shortcuts

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