Documentation
¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int64(i int64) *int64
- func Pointer[T any](v T) *T
- func String(s string) *string
- type HTTPClient
- type Lambda
- func (s *Lambda) AddSSHKey(ctx context.Context, request shared.AddSSHKey, opts ...operations.Option) (*operations.AddSSHKeyResponse, error)
- func (s *Lambda) DeleteSSHKey(ctx context.Context, request operations.DeleteSSHKeyRequest, ...) (*operations.DeleteSSHKeyResponse, error)
- func (s *Lambda) GetInstance(ctx context.Context, request operations.GetInstanceRequest, ...) (*operations.GetInstanceResponse, error)
- func (s *Lambda) InstanceTypes(ctx context.Context, opts ...operations.Option) (*operations.InstanceTypesResponse, error)
- func (s *Lambda) LaunchInstance(ctx context.Context, request shared.Launch, opts ...operations.Option) (*operations.LaunchInstanceResponse, error)
- func (s *Lambda) ListFileSystems(ctx context.Context, opts ...operations.Option) (*operations.ListFileSystemsResponse, error)
- func (s *Lambda) ListInstances(ctx context.Context, opts ...operations.Option) (*operations.ListInstancesResponse, error)
- func (s *Lambda) ListSSHKeys(ctx context.Context, opts ...operations.Option) (*operations.ListSSHKeysResponse, error)
- func (s *Lambda) RestartInstance(ctx context.Context, request shared.Restart, opts ...operations.Option) (*operations.RestartInstanceResponse, error)
- func (s *Lambda) TerminateInstance(ctx context.Context, request shared.Terminate, opts ...operations.Option) (*operations.TerminateInstanceResponse, error)
- func (s *Lambda) UpdateInstance(ctx context.Context, request shared.Update, opts ...operations.Option) (*operations.UpdateInstanceResponse, error)
- type SDKOption
- func WithClient(client HTTPClient) SDKOption
- func WithRetryConfig(retryConfig retry.Config) SDKOption
- func WithSecurity(security shared.Security) SDKOption
- func WithSecuritySource(security func(context.Context) (shared.Security, error)) SDKOption
- func WithServerIndex(serverIndex int) SDKOption
- func WithServerURL(serverURL string) SDKOption
- func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption
- func WithTimeout(timeout time.Duration) SDKOption
Constants ¶
This section is empty.
Variables ¶
var ServerList = []string{
"https://cloud.lambdalabs.com/api/v1/",
"https:///api/v1/",
}
ServerList contains the list of servers available to the SDK
Functions ¶
Types ¶
type HTTPClient ¶
HTTPClient provides an interface for suplying the SDK with a custom HTTP client
type Lambda ¶
type Lambda struct {
// contains filtered or unexported fields
}
Lambda Provider: API for interacting with the Lambda GPU Cloud
func (*Lambda) AddSSHKey ¶
func (s *Lambda) AddSSHKey(ctx context.Context, request shared.AddSSHKey, opts ...operations.Option) (*operations.AddSSHKeyResponse, error)
AddSSHKey - Add SSH key Add an SSH key
To use an existing key pair, enter the public key for the `public_key` property of the request body.
To generate a new key pair, omit the `public_key` property from the request body. Save the `private_key` from the response somewhere secure. For example, with curl:
```
curl https://cloud.lambdalabs.com/api/v1/ssh-keys \
--fail \
-u ${LAMBDA_API_KEY}: \
-X POST \
-d '{"name": "new key"}' \
| jq -r '.data.private_key' > key.pem
chmod 400 key.pem ```
Then, after you launch an instance with `new key` attached to it: ``` ssh -i key.pem <instance IP> ```
func (*Lambda) DeleteSSHKey ¶
func (s *Lambda) DeleteSSHKey(ctx context.Context, request operations.DeleteSSHKeyRequest, opts ...operations.Option) (*operations.DeleteSSHKeyResponse, error)
DeleteSSHKey - Delete SSH key Delete an SSH key.
func (*Lambda) GetInstance ¶
func (s *Lambda) GetInstance(ctx context.Context, request operations.GetInstanceRequest, opts ...operations.Option) (*operations.GetInstanceResponse, error)
GetInstance - List details of a specific instance Retrieves details of a specific instance, including whether or not the instance is running.
func (*Lambda) InstanceTypes ¶
func (s *Lambda) InstanceTypes(ctx context.Context, opts ...operations.Option) (*operations.InstanceTypesResponse, error)
InstanceTypes - Retrieve list of offered instance types Returns a detailed list of the instance types offered by Lambda GPU Cloud. The details include the regions, if any, in which each instance type is currently available.
func (*Lambda) LaunchInstance ¶
func (s *Lambda) LaunchInstance(ctx context.Context, request shared.Launch, opts ...operations.Option) (*operations.LaunchInstanceResponse, error)
LaunchInstance - Launch instances Launches one or more instances of a given instance type.
func (*Lambda) ListFileSystems ¶
func (s *Lambda) ListFileSystems(ctx context.Context, opts ...operations.Option) (*operations.ListFileSystemsResponse, error)
ListFileSystems - List file systems Retrieve the list of file systems
func (*Lambda) ListInstances ¶
func (s *Lambda) ListInstances(ctx context.Context, opts ...operations.Option) (*operations.ListInstancesResponse, error)
ListInstances - List running instances Retrieves a detailed list of running instances.
func (*Lambda) ListSSHKeys ¶
func (s *Lambda) ListSSHKeys(ctx context.Context, opts ...operations.Option) (*operations.ListSSHKeysResponse, error)
ListSSHKeys - List SSH keys Retrieve the list of SSH keys
func (*Lambda) RestartInstance ¶
func (s *Lambda) RestartInstance(ctx context.Context, request shared.Restart, opts ...operations.Option) (*operations.RestartInstanceResponse, error)
RestartInstance - Restart instances Restarts the given instances.
func (*Lambda) TerminateInstance ¶
func (s *Lambda) TerminateInstance(ctx context.Context, request shared.Terminate, opts ...operations.Option) (*operations.TerminateInstanceResponse, error)
TerminateInstance - Terminate an instance Terminates a given instance.
func (*Lambda) UpdateInstance ¶ added in v0.1.3
func (s *Lambda) UpdateInstance(ctx context.Context, request shared.Update, opts ...operations.Option) (*operations.UpdateInstanceResponse, error)
UpdateInstance - Update instance Updates the instance matching the given ID
type SDKOption ¶
type SDKOption func(*Lambda)
func WithClient ¶
func WithClient(client HTTPClient) SDKOption
WithClient allows the overriding of the default HTTP client used by the SDK
func WithRetryConfig ¶
func WithSecurity ¶
WithSecurity configures the SDK to use the provided security details
func WithSecuritySource ¶
WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication
func WithServerIndex ¶
WithServerIndex allows the overriding of the default server by index
func WithServerURL ¶
WithServerURL allows the overriding of the default server URL
func WithTemplatedServerURL ¶
WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters
func WithTimeout ¶
WithTimeout Optional request timeout applied to each operation