func (s *server) RunBlpUntil(ctx context.Context, request *pb.RunBlpUntilRequest) (*pb.RunBlpUntilResponse, error) { ctx = callinfo.GRPCCallInfo(ctx) response := &pb.RunBlpUntilResponse{} return response, s.agent.RPCWrapLock(ctx, actionnode.TabletActionRunBLPUntil, request, response, true, func() error { position, err := s.agent.RunBlpUntil(ctx, blproto.ProtoToBlpPositionList(request.BlpPositions), time.Duration(request.WaitTimeout)) if err == nil { response.Position = myproto.EncodeReplicationPosition(*position) } return err }) }
// StopBlp is part of the tmclient.TabletManagerClient interface func (client *Client) StopBlp(ctx context.Context, tablet *topo.TabletInfo) (*blproto.BlpPositionList, error) { cc, c, err := client.dial(ctx, tablet) if err != nil { return nil, err } defer cc.Close() response, err := c.StopBlp(ctx, &pb.StopBlpRequest{}) if err != nil { return nil, err } return blproto.ProtoToBlpPositionList(response.BlpPositions), nil }