Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterServersURL ¶
func ClusterServersURL(c *gcorecloud.ServiceClient, clusterID string) string
ClusterServersURL returns URL for listing servers in a specific GPU cluster
Types ¶
type ListResult ¶
type ListResult struct {
gcorecloud.Result
}
ListResult represents the result of a List operation.
func List ¶
func List(client *gcorecloud.ServiceClient, clusterID string) (r ListResult)
List retrieves servers of a specific GPU cluster.
func (ListResult) Extract ¶
func (r ListResult) Extract() (*ServersPage, error)
Extract is a function that accepts a result and extracts a list of servers.
type Server ¶
type Server struct {
ID string `json:"id"`
ImageID *string `json:"image_id"`
TaskID *string `json:"task_id"`
Flavor string `json:"flavor"`
KeypairID *string `json:"keypair_id"`
Name string `json:"name"`
Status string `json:"status"`
IPAddresses []string `json:"ip_addresses"`
SecurityGroups []string `json:"security_groups"`
Tags []Tag `json:"tags"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Server represents a server in a GPU cluster
func ExtractServers ¶
func ExtractServers(lr ListResult) ([]Server, error)
ExtractServers accepts a ListResult and extracts the servers.
type ServersPage ¶
ServersPage represents a page of servers results.
func (ServersPage) IsEmpty ¶
func (r ServersPage) IsEmpty() bool
IsEmpty returns true if a ServersPage contains no results.
Click to show internal directories.
Click to hide internal directories.