Pickaxe.CancelledCommands, Pickaxe.InfrastructureConfig, Pickaxe.InfrastructureStats, Pickaxe.MinerConfig, Pickaxe.PickaxeConfiguration, Pickaxe.PickaxeInstance| Constructor and Description |
|---|
PickaxeImpl(String clientId,
String pickaxeId,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
WebUtil webUtil)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<Pickaxe.PickaxeInstance> |
all()
Returns all of the pickaxes.
|
Optional<List<String>> |
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.
|
public List<Pickaxe.PickaxeInstance> all()
Pickaxepublic Optional<List<String>> cancelCommands()
PickaxecancelCommands in interface Pickaxepublic Optional<CommandDone.Response> commandDone(CommandDone done, String commandId)
PickaxecommandDone in interface Pickaxedone - The completed command.commandId - The referencing command ID.public Optional<CommandDoneBatch.Response> commandDoneBatch(CommandDoneBatch done)
PickaxecommandDoneBatch in interface Pickaxedone - The completed commands.public Optional<CommandStart.Response> commandStarted(CommandStart start)
PickaxecommandStarted in interface Pickaxestart - The started command.public Optional<CommandStartBatch.Response> commandStartedBatch(CommandStartBatch start)
PickaxecommandStartedBatch in interface Pickaxestart - The started commands.public Optional<CommandUpdate.Response> commandUpdate(CommandUpdate update, String commandId)
PickaxecommandUpdate in interface Pickaxeupdate - The updated command.commandId - The referencing command ID.public Optional<CommandUpdateBatch.Response> commandUpdateBatch(CommandUpdateBatch update)
PickaxecommandUpdateBatch in interface Pickaxeupdate - The updates.public Optional<Pickaxe.PickaxeConfiguration> config()
Pickaxepublic Optional<Commands> getCommands()
PickaxegetCommands in interface Pickaxepublic Optional<List<Pickaxe.InfrastructureConfig>> infrastructureConfigs()
PickaxeinfrastructureConfigs in interface Pickaxepublic boolean infrastructureUpdate(List<Pickaxe.InfrastructureStats> stats)
PickaxeinfrastructureUpdate in interface Pickaxestats - The stats.public Optional<List<Pickaxe.MinerConfig>> minerConfigs(String version, String hostname, String hostIp)
PickaxeminerConfigs in interface Pickaxeversion - The version.hostname - The hostname.hostIp - The host IP.public boolean started()
Pickaxepublic boolean updateMacs(Map<Miners.Miner,String> newMacs)
PickaxeupdateMacs in interface PickaxenewMacs - The new MACs.Copyright © 2024 OBM, LLC. All rights reserved.