public interface Pickaxe
Pickaxe provides a handler for interacting with the
/api/pickaxe Foreman API endpoint.| Modifier and Type | Interface and Description |
|---|---|
static class |
Pickaxe.CancelledCommands
All of the cancelled commands.
|
static class |
Pickaxe.InfrastructureConfig
An infrastructure configuration.
|
static class |
Pickaxe.InfrastructureStats
The stats for a device.
|
static class |
Pickaxe.MinerConfig
A miner configuration.
|
static class |
Pickaxe.PickaxeConfiguration
The pickaxe configuration.
|
static class |
Pickaxe.PickaxeInstance
A pickaxe instance.
|
| Modifier and Type | Method and Description |
|---|---|
List<Pickaxe.PickaxeInstance> |
all()
Returns all of the pickaxes.
|
Optional<List<Integer>> |
cancelCommands()
Cancels all of the pending or in-progress commands on this Pickaxe.
|
Optional<CommandDone.Response> |
commandDone(CommandDone done,
String commandId)
Sends a command completion to the Foreman API.
|
Optional<CommandDoneBatch.Response> |
commandDoneBatch(CommandDoneBatch done)
Sends command completions to the Foreman API.
|
Optional<CommandStart.Response> |
commandStarted(CommandStart start)
Sends a command started to the Foreman API.
|
Optional<CommandStartBatch.Response> |
commandStartedBatch(CommandStartBatch start)
Sends command starts to the Foreman API.
|
Optional<CommandUpdate.Response> |
commandUpdate(CommandUpdate update,
String commandId)
Sends a command update to the Foreman API.
|
Optional<CommandUpdateBatch.Response> |
commandUpdateBatch(CommandUpdateBatch update)
Sends command updates to the Foreman API.
|
Optional<Pickaxe.PickaxeConfiguration> |
config()
Obtains the configuration.
|
Optional<Commands> |
getCommands()
Queries for pending commands to be executed.
|
Optional<List<Pickaxe.InfrastructureConfig>> |
infrastructureConfigs()
Returns the infrastructure configs.
|
boolean |
infrastructureUpdate(List<Pickaxe.InfrastructureStats> stats)
Publishes the provided stats to the Foreman API.
|
Optional<List<Pickaxe.MinerConfig>> |
minerConfigs(String version,
String hostname,
String hostIp)
Returns the miner configurations.
|
boolean |
started()
Informs Foreman that the Pickaxe has started.
|
boolean |
updateMacs(Map<Miners.Miner,String> newMacs)
Sets the MACs for the provided miners.
|
List<Pickaxe.PickaxeInstance> all()
Optional<List<Integer>> cancelCommands()
Optional<CommandDone.Response> commandDone(CommandDone done, String commandId)
done - The completed command.commandId - The referencing command ID.Optional<CommandDoneBatch.Response> commandDoneBatch(CommandDoneBatch done)
done - The completed commands.Optional<CommandStart.Response> commandStarted(CommandStart start)
start - The started command.Optional<CommandStartBatch.Response> commandStartedBatch(CommandStartBatch start)
start - The started commands.Optional<CommandUpdate.Response> commandUpdate(CommandUpdate update, String commandId)
update - The updated command.commandId - The referencing command ID.Optional<CommandUpdateBatch.Response> commandUpdateBatch(CommandUpdateBatch update)
update - The updates.Optional<Pickaxe.PickaxeConfiguration> config()
Optional<Commands> getCommands()
Optional<List<Pickaxe.InfrastructureConfig>> infrastructureConfigs()
boolean infrastructureUpdate(List<Pickaxe.InfrastructureStats> stats)
stats - The stats.Optional<List<Pickaxe.MinerConfig>> minerConfigs(String version, String hostname, String hostIp)
version - The version.hostname - The hostname.hostIp - The host IP.boolean started()
boolean updateMacs(Map<Miners.Miner,String> newMacs)
newMacs - The new MACs.Copyright © 2023 OBM, LLC. All rights reserved.