Documentation ¶
Overview ¶
Package logind provides D-Bus logind mock to facilitate graceful kubelet shutdown.
Index ¶
Constants ¶
This section is empty.
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(serviceSocketPath, clientSocketPath string) (*DBusBroker, error)
NewBroker initializes new 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) 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.
Click to show internal directories.
Click to hide internal directories.