Documentation
¶
Index ¶
- type API
- func (a *API) AddKey(name, key string) (string, error)
- func (a *API) Close() error
- func (a *API) CreateOrUpdateDevice(hostname string, conf *conf.Conf, console Console, id string) (*packngo.Device, error)
- func (a *API) DeleteDevice(deviceID string) error
- func (a *API) DeleteKey(keyID string) error
- func (a *API) GC(gracePeriod time.Duration) error
- func (a *API) GetDeviceAddress(device *packngo.Device, family int, public bool) string
- func (a *API) ListKeys() ([]packngo.SSHKey, error)
- func (a *API) PreflightCheck() error
- type Console
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) CreateOrUpdateDevice ¶
func (a *API) CreateOrUpdateDevice(hostname string, conf *conf.Conf, console Console, id string) (*packngo.Device, error)
console is optional, and is closed on error or when the device is deleted.
func (*API) DeleteDevice ¶
func (*API) GetDeviceAddress ¶
func (*API) PreflightCheck ¶
type Options ¶
type Options struct { *platform.Options // Config file. Defaults to $HOME/.config/equinixmetal.json. ConfigPath string // Profile name Profile string // API key (overrides config profile) ApiKey string // Project UUID (overrides config profile) Project string // EquinixMetal location code Facility string // Slug of the device type (e.g. "baremetal_0") Plan string // e.g. http://alpha.release.flatcar-linux.net/amd64-usr/current InstallerImageBaseURL string // e.g. http://alpha.release.flatcar-linux.net/amd64-usr/current/flatcar_production_pxe.vmlinuz InstallerImageKernelURL string // e.g. http://alpha.release.flatcar-linux.net/amd64-usr/current/flatcar_production_pxe_image.cpio.gz InstallerImageCpioURL string // e.g. https://alpha.release.flatcar-linux.net/amd64-usr/current/flatcar_production_packet_image.bin.bz2 ImageURL string // Options for Google Storage GSOptions *gcloud.Options // Google Storage base URL for temporary uploads // e.g. gs://users.developer.core-os.net/bovik/mantle StorageURL string // Metro is where you want your server to live. Metro string // RemoteUser is the user for the SSH connection. RemoteUser string // RemoteSSHPrivateKeyPath is the private SSH key path used for the SSH authentication. RemoteSSHPrivateKeyPath string // RemoteDocumentRoot is the path served by the webserver. RemoteDocumentRoot string // LaunchTimeout specifies the timeout used for waiting for instance to launch. LaunchTimeout time.Duration // InstallTimeout specifies the timeout used for waiting for installation to finish. InstallTimeout time.Duration }
Click to show internal directories.
Click to hide internal directories.