Class: Pvectl::Commands::Logs::Handlers::TaskDetail

Inherits:
Object
  • Object
show all
Includes:
ResourceHandler
Defined in:
lib/pvectl/commands/logs/handlers/task_detail.rb

Overview

Handler for task log drill-down by UPID.

Fetches individual task log lines from the Proxmox API. Extracts the node name from the UPID for API routing.

Examples:

Using via registry

handler = Logs::ResourceRegistry.for("task")
lines = handler.list(upid: "UPID:pve1:000ABC:...")

See Also:

Instance Method Summary collapse

Constructor Details

#initialize(repository: nil) ⇒ TaskDetail

Returns a new instance of TaskDetail.



22
23
24
# File 'lib/pvectl/commands/logs/handlers/task_detail.rb', line 22

def initialize(repository: nil)
  @repository = repository
end

Instance Method Details

#list(upid:, start: 0, limit: 512, **_) ⇒ Object



26
27
28
# File 'lib/pvectl/commands/logs/handlers/task_detail.rb', line 26

def list(upid:, start: 0, limit: 512, **_)
  repository.list(upid: upid, start: start, limit: limit)
end

#presenterObject



30
31
32
# File 'lib/pvectl/commands/logs/handlers/task_detail.rb', line 30

def presenter
  Presenters::TaskLogLine.new
end