Skip to content

Commit 8b9f855

Browse files
add health/provision status related methods (#847)
1 parent 07b747c commit 8b9f855

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

agent_client.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,19 @@ func (c *AgentClient) ListPrivateLinks(ctx context.Context, req *livekit.ListPri
144144
}
145145
return c.agentClient.ListPrivateLinks(ctx, req)
146146
}
147+
148+
func (c *AgentClient) GetPrivateLinkProvisioningStatus(ctx context.Context, req *livekit.GetPrivateLinkProvisioningStatusRequest) (*livekit.GetPrivateLinkProvisioningStatusResponse, error) {
149+
ctx, err := c.withAuth(ctx, withAgentGrant{Admin: true})
150+
if err != nil {
151+
return nil, err
152+
}
153+
return c.agentClient.GetPrivateLinkProvisioningStatus(ctx, req)
154+
}
155+
156+
func (c *AgentClient) GetPrivateLinkHealthStatus(ctx context.Context, req *livekit.GetPrivateLinkHealthStatusRequest) (*livekit.GetPrivateLinkHealthStatusResponse, error) {
157+
ctx, err := c.withAuth(ctx, withAgentGrant{Admin: true})
158+
if err != nil {
159+
return nil, err
160+
}
161+
return c.agentClient.GetPrivateLinkHealthStatus(ctx, req)
162+
}

pkg/cloudagents/client.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,16 @@ func (c *Client) ListPrivateLinks(ctx context.Context, req *lkproto.ListPrivateL
137137
return c.AgentClient.ListPrivateLinks(ctx, req)
138138
}
139139

140+
// GetPrivateLinkProvisioningStatus gets provisioning status for a private link.
141+
func (c *Client) GetPrivateLinkProvisioningStatus(ctx context.Context, req *lkproto.GetPrivateLinkProvisioningStatusRequest) (*lkproto.GetPrivateLinkProvisioningStatusResponse, error) {
142+
return c.AgentClient.GetPrivateLinkProvisioningStatus(ctx, req)
143+
}
144+
145+
// GetPrivateLinkHealthStatus gets health status for a private link.
146+
func (c *Client) GetPrivateLinkHealthStatus(ctx context.Context, req *lkproto.GetPrivateLinkHealthStatusRequest) (*lkproto.GetPrivateLinkHealthStatusResponse, error) {
147+
return c.AgentClient.GetPrivateLinkHealthStatus(ctx, req)
148+
}
149+
140150
// uploadAndBuild uploads the source and triggers remote build
141151
func (c *Client) uploadAndBuild(
142152
ctx context.Context,

0 commit comments

Comments
 (0)