Example #1
0
func ListServer(clusterAPIClient pfs.ClusterAPIClient) ([]*pfs.ServerInfo, error) {
	serverInfos, err := clusterAPIClient.ListServer(
		context.Background(),
		&pfs.ListServerRequest{},
	)
	if err != nil {
		return nil, err
	}
	return serverInfos.ServerInfo, nil
}
Example #2
0
func InspectServer(clusterAPIClient pfs.ClusterAPIClient, serverID string) (*pfs.ServerInfo, error) {
	return clusterAPIClient.InspectServer(
		context.Background(),
		&pfs.InspectServerRequest{
			Server: &pfs.Server{
				Id: serverID,
			},
		},
	)
}