@@ -78,14 +78,14 @@ type CreateEnvironmentRequest struct {
78
78
79
79
// CreateEnvironment sends a request to create an environment.
80
80
func (c Client )CreateEnvironment (ctx context.Context ,orgID string ,req CreateEnvironmentRequest ) (* Environment ,error ) {
81
- var env * Environment
81
+ var env Environment
82
82
err := c .requestBody (
83
83
ctx ,
84
84
http .MethodPost ,"/api/orgs/" + orgID + "/environments" ,
85
85
req ,
86
- env ,
86
+ & env ,
87
87
)
88
- return env ,err
88
+ return & env ,err
89
89
}
90
90
91
91
// EnvironmentsByOrganization gets the list of environments owned by the given user.
@@ -116,6 +116,11 @@ func (c Client) DialWsep(ctx context.Context, env *Environment) (*websocket.Conn
116
116
return c .dialWs (ctx ,"/proxy/environments/" + env .ID + "/wsep" )
117
117
}
118
118
119
+ // DialIDEStatus opens a websocket connection for cpu load metrics on the environment
120
+ func (c Client )DialIDEStatus (ctx context.Context ,envID string ) (* websocket.Conn ,error ) {
121
+ return c .dialWs (ctx ,"/proxy/environments/" + envID + "/ide/api/status" )
122
+ }
123
+
119
124
// DialEnvironmentBuildLog opens a websocket connection for the environment build log messages
120
125
func (c Client )DialEnvironmentBuildLog (ctx context.Context ,envID string ) (* websocket.Conn ,error ) {
121
126
return c .dialWs (ctx ,"/api/environments/" + envID + "/watch-update" )
@@ -125,3 +130,8 @@ func (c Client) DialEnvironmentBuildLog(ctx context.Context, envID string) (*web
125
130
func (c Client )DialEnvironmentStats (ctx context.Context ,envID string ) (* websocket.Conn ,error ) {
126
131
return c .dialWs (ctx ,"/api/environments/" + envID + "/watch-stats" )
127
132
}
133
+
134
+ // DialResourceLoad opens a websocket connection for cpu load metrics on the environment
135
+ func (c Client )DialResourceLoad (ctx context.Context ,envID string ) (* websocket.Conn ,error ) {
136
+ return c .dialWs (ctx ,"/api/environments/" + envID + "/watch-resource-load" )
137
+ }