mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
formatted
This commit is contained in:
parent
8f5cb5610c
commit
325cbba19e
1 changed files with 5 additions and 5 deletions
|
|
@ -534,9 +534,9 @@ func (r *LibpodRuntime) Events(ctx context.Context) (<-chan Event, <-chan error)
|
||||||
// Configure event streaming
|
// Configure event streaming
|
||||||
opts := events.ReadOptions{
|
opts := events.ReadOptions{
|
||||||
EventChannel: libpodEventChan,
|
EventChannel: libpodEventChan,
|
||||||
Stream: true, // Follow new events (tail -f mode)
|
Stream: true, // Follow new events (tail -f mode)
|
||||||
FromStart: false, // Don't replay historical events
|
FromStart: false, // Don't replay historical events
|
||||||
Filters: []string{}, // Empty = all event types
|
Filters: []string{}, // Empty = all event types
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start libpod event reader in background goroutine
|
// Start libpod event reader in background goroutine
|
||||||
|
|
@ -612,8 +612,8 @@ func (r *LibpodRuntime) Events(ctx context.Context) (<-chan Event, <-chan error)
|
||||||
// convertLibpodEvent converts native libpod event to ContainerRuntime Event format.
|
// convertLibpodEvent converts native libpod event to ContainerRuntime Event format.
|
||||||
func convertLibpodEvent(e *events.Event) Event {
|
func convertLibpodEvent(e *events.Event) Event {
|
||||||
return Event{
|
return Event{
|
||||||
Type: string(e.Type), // "Container", "Pod", "Image", "Volume", "Network"
|
Type: string(e.Type), // "Container", "Pod", "Image", "Volume", "Network"
|
||||||
Action: string(e.Status), // "start", "stop", "create", "remove", etc.
|
Action: string(e.Status), // "start", "stop", "create", "remove", etc.
|
||||||
Actor: EventActor{
|
Actor: EventActor{
|
||||||
ID: e.ID,
|
ID: e.ID,
|
||||||
Attributes: e.Attributes,
|
Attributes: e.Attributes,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue