MCPcopy Create free account
hub / github.com/eth-easl/dirigent / syncDeploymentCache

Method syncDeploymentCache

internal/data_plane/data_plane.go:219–230  ·  view source on GitHub ↗
(cpApi *proto.CpiInterfaceClient, deployments *function_metadata.Deployments)

Source from the content-addressed store, hash-verified

217}
218
219func (d *Dataplane) syncDeploymentCache(cpApi *proto.CpiInterfaceClient, deployments *function_metadata.Deployments) error {
220 resp, err := (*cpApi).ListServices(context.Background(), &emptypb.Empty{})
221 if err != nil {
222 return errors.New("initial deployment cache synchronization failed")
223 }
224
225 for i := 0; i < len(resp.Service); i++ {
226 deployments.AddDeployment(resp.Service[i], d.dataplaneID)
227 }
228
229 return nil
230}
231
232func (d *Dataplane) DrainSandbox(patch *proto.DeploymentEndpointPatch) (*proto.DeploymentUpdateSuccess, error) {
233 deployment, _ := d.deployments.GetDeployment(patch.GetService().GetName())

Callers 1

GetProxyServerMethod · 0.95

Calls 2

ListServicesMethod · 0.65
AddDeploymentMethod · 0.65

Tested by

no test coverage detected