Skip to content

Commit

Permalink
Remove cloud orchestrator client code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ser-io committed Oct 21, 2024
1 parent bfd053b commit 8caf70f
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 333 deletions.
4 changes: 0 additions & 4 deletions frontend/src/libhoclient/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ gazelle(name = "gazelle")
go_library(
name = "libhoclient",
srcs = [
"client.go",
"host_orchestrator_client.go",
"httputils.go",
],
Expand All @@ -16,7 +15,6 @@ go_library(
"@com_github_cenkalti_backoff_v4//:backoff",
"@com_github_google_android_cuttlefish_frontend_src_host_orchestrator//api/v1:api",
"@com_github_google_android_cuttlefish_frontend_src_liboperator//api/v1:api",
"@com_github_google_cloud_android_orchestration//api/v1:api",
"@com_github_google_cloud_android_orchestration//pkg/webrtcclient",
"@com_github_gorilla_websocket//:websocket",
"@com_github_hashicorp_go_multierror//:go-multierror",
Expand All @@ -27,14 +25,12 @@ go_library(
go_test(
name = "libhoclient_test",
srcs = [
"client_test.go",
"host_orchestrator_client_test.go",
"httputils_test.go",
],
embed = [":libhoclient"],
deps = [
"@com_github_google_android_cuttlefish_frontend_src_host_orchestrator//api/v1:api",
"@com_github_google_cloud_android_orchestration//api/v1:api",
"@com_github_google_go_cmp//cmp",
"@com_github_hashicorp_go_multierror//:go-multierror",
],
Expand Down
217 changes: 0 additions & 217 deletions frontend/src/libhoclient/client.go

This file was deleted.

76 changes: 0 additions & 76 deletions frontend/src/libhoclient/client_test.go

This file was deleted.

14 changes: 14 additions & 0 deletions frontend/src/libhoclient/host_orchestrator_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ import (
"github.com/pion/webrtc/v3"
)

type ApiCallError struct {
Code int `json:"code,omitempty"`
ErrorMsg string `json:"error,omitempty"`
Details string `json:"details,omitempty"`
}

func (e *ApiCallError) Error() string {
str := fmt.Sprintf("api call error %d: %s", e.Code, e.ErrorMsg)
if e.Details != "" {
str += fmt.Sprintf("\n\nDETAILS: %s", e.Details)
}
return str
}

type ConnectWebRTCOpts struct {
LocalICEConfig *wclient.ICEConfig
}
Expand Down
Loading

0 comments on commit 8caf70f

Please sign in to comment.