This commit substitutes the now-deprecated gosdc library for the newer triton-go library. This is transparent from a user perspective, except for the fact that key material can now be ommitted and requests can be signed with an SSH agent. This allows for both encrypted keys and ECDSA keys to be used. In addition, a fix is made to not pass in an empty array of networks if none are specified in configuration, thus honouring the API default of putting instances with no explicit networks specified on the Joyent public and internal shared networks.
18 lines
560 B
Go
18 lines
560 B
Go
package triton
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Driver interface {
|
|
CreateImageFromMachine(machineId string, config Config) (string, error)
|
|
CreateMachine(config Config) (string, error)
|
|
DeleteImage(imageId string) error
|
|
DeleteMachine(machineId string) error
|
|
GetMachineIP(machineId string) (string, error)
|
|
StopMachine(machineId string) error
|
|
WaitForImageCreation(imageId string, timeout time.Duration) error
|
|
WaitForMachineDeletion(machineId string, timeout time.Duration) error
|
|
WaitForMachineState(machineId string, state string, timeout time.Duration) error
|
|
}
|