MCPcopy Create free account
hub / github.com/bytebase/bytebase / BatchUpdateInstances

Method BatchUpdateInstances

backend/api/v1/instance_service.go:791–801  ·  view source on GitHub ↗

BatchUpdateInstances update multiple instances.

(ctx context.Context, req *connect.Request[v1pb.BatchUpdateInstancesRequest])

Source from the content-addressed store, hash-verified

789
790// BatchUpdateInstances update multiple instances.
791func (s *InstanceService) BatchUpdateInstances(ctx context.Context, req *connect.Request[v1pb.BatchUpdateInstancesRequest]) (*connect.Response[v1pb.BatchUpdateInstancesResponse], error) {
792 response := &v1pb.BatchUpdateInstancesResponse{}
793 for _, updateReq := range req.Msg.GetRequests() {
794 updated, err := s.UpdateInstance(ctx, connect.NewRequest(updateReq))
795 if err != nil {
796 return nil, err
797 }
798 response.Instances = append(response.Instances, updated.Msg)
799 }
800 return connect.NewResponse(response), nil
801}
802
803// AddDataSource adds a data source to an instance.
804func (s *InstanceService) AddDataSource(ctx context.Context, req *connect.Request[v1pb.AddDataSourceRequest]) (*connect.Response[v1pb.Instance], error) {

Callers

nothing calls this directly

Calls 2

UpdateInstanceMethod · 0.95
GetRequestsMethod · 0.45

Tested by

no test coverage detected